From 4c0937afbce817ebf9edb35fba043a60cac2b104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20S=20-=20Piper?= Date: Sun, 29 Oct 2023 12:12:09 +0000 Subject: [PATCH] Show serial number on device page --- custom_components/miele/binary_sensor.py | 1 + custom_components/miele/button.py | 1 + custom_components/miele/climate.py | 1 + custom_components/miele/fan.py | 1 + custom_components/miele/light.py | 1 + custom_components/miele/number.py | 1 + custom_components/miele/sensor.py | 1 + custom_components/miele/switch.py | 1 + custom_components/miele/vacuum.py | 1 + 9 files changed, 9 insertions(+) diff --git a/custom_components/miele/binary_sensor.py b/custom_components/miele/binary_sensor.py index 88c6e007..bb0dca1b 100644 --- a/custom_components/miele/binary_sensor.py +++ b/custom_components/miele/binary_sensor.py @@ -327,6 +327,7 @@ def __init__( self._attr_unique_id = f"{self.entity_description.key}-{self._ent}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/button.py b/custom_components/miele/button.py index ff56e318..9407f97f 100644 --- a/custom_components/miele/button.py +++ b/custom_components/miele/button.py @@ -167,6 +167,7 @@ def __init__( self._attr_unique_id = f"{self.entity_description.key}-{self._ent}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/climate.py b/custom_components/miele/climate.py index d5c05a20..0ea5605b 100644 --- a/custom_components/miele/climate.py +++ b/custom_components/miele/climate.py @@ -216,6 +216,7 @@ def __init__( self._attr_supported_features = self._ed.supported_features self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/fan.py b/custom_components/miele/fan.py index 7ffa0bb8..8985ae05 100644 --- a/custom_components/miele/fan.py +++ b/custom_components/miele/fan.py @@ -152,6 +152,7 @@ def __init__( self._attr_supported_features = self.entity_description.supported_features self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/light.py b/custom_components/miele/light.py index 0e202625..4844e895 100644 --- a/custom_components/miele/light.py +++ b/custom_components/miele/light.py @@ -156,6 +156,7 @@ def __init__( self._attr_supported_features = self.entity_description.supported_features self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/number.py b/custom_components/miele/number.py index 2b5c04d2..01d909dc 100644 --- a/custom_components/miele/number.py +++ b/custom_components/miele/number.py @@ -220,6 +220,7 @@ def __init__( # self._attr_supported_features = self._ed.supported_features self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/sensor.py b/custom_components/miele/sensor.py index b11d3f6a..a25171a9 100644 --- a/custom_components/miele/sensor.py +++ b/custom_components/miele/sensor.py @@ -753,6 +753,7 @@ def __init__( self._attr_unique_id = f"{self.entity_description.key}-{self._ent}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/switch.py b/custom_components/miele/switch.py index 43da5473..3e4ffc27 100644 --- a/custom_components/miele/switch.py +++ b/custom_components/miele/switch.py @@ -186,6 +186,7 @@ def __init__( self._attr_unique_id = f"{self.entity_description.key}-{self._ent}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"], diff --git a/custom_components/miele/vacuum.py b/custom_components/miele/vacuum.py index 9abda82e..8261881a 100644 --- a/custom_components/miele/vacuum.py +++ b/custom_components/miele/vacuum.py @@ -160,6 +160,7 @@ def __init__( self._attr_unique_id = f"{self.entity_description.key}-{self._ent}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._ent)}, + serial_number=self._ent, name=appl_type, manufacturer=MANUFACTURER, model=self.coordinator.data[self._ent]["ident|deviceIdentLabel|techType"],