From a3cea22623e220c857bc210b2256c679b75c603f Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Mon, 9 Sep 2024 14:22:26 +0300 Subject: [PATCH] Include the "device label" in the device name too --- custom_components/vinx/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/vinx/__init__.py b/custom_components/vinx/__init__.py index 9f1db2c..174c2f8 100644 --- a/custom_components/vinx/__init__.py +++ b/custom_components/vinx/__init__.py @@ -31,13 +31,14 @@ async def get_device_information(lw3: LW3) -> DeviceInformation: async with lw3.connection(): mac_address = str(await lw3.get_property("/.MacAddress")) product_name = str(await lw3.get_property("/.ProductName")) + device_label = str(await lw3.get_property("/SYS/MB.DeviceLabel")) firmware_version = str(await lw3.get_property("/.FirmwareVersion")) serial_number = str(await lw3.get_property("/.SerialNumber")) ip_address = str(await lw3.get_property("/MANAGEMENT/NETWORK.IpAddress")) device_info = DeviceInfo( identifiers={(DOMAIN, format_mac(mac_address))}, - name=product_name, + name=f"{device_label} ({product_name})", manufacturer="Lightware", model=product_name, sw_version=firmware_version,