From c88672c352096d6cb4eba4fcba0383fddeca022a Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sun, 27 Aug 2023 20:10:08 +0200 Subject: [PATCH] Make Anova device unique id public (#99147) --- homeassistant/components/anova/coordinator.py | 4 ++-- homeassistant/components/anova/entity.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/anova/coordinator.py b/homeassistant/components/anova/coordinator.py index 94bd9bec9aa..83dc2c295c3 100644 --- a/homeassistant/components/anova/coordinator.py +++ b/homeassistant/components/anova/coordinator.py @@ -30,7 +30,7 @@ class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]): update_interval=timedelta(seconds=30), ) assert self.config_entry is not None - self._device_unique_id = anova_device.device_key + self.device_unique_id = anova_device.device_key self.anova_device = anova_device self.device_info: DeviceInfo | None = None @@ -38,7 +38,7 @@ class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]): def async_setup(self, firmware_version: str) -> None: """Set the firmware version info.""" self.device_info = DeviceInfo( - identifiers={(DOMAIN, self._device_unique_id)}, + identifiers={(DOMAIN, self.device_unique_id)}, name="Anova Precision Cooker", manufacturer="Anova", model="Precision Cooker", diff --git a/homeassistant/components/anova/entity.py b/homeassistant/components/anova/entity.py index c4d4ff2e2b2..d3ed2eb2667 100644 --- a/homeassistant/components/anova/entity.py +++ b/homeassistant/components/anova/entity.py @@ -28,4 +28,4 @@ class AnovaDescriptionEntity(AnovaEntity): """Initialize the entity and declare unique id based on description key.""" super().__init__(coordinator) self.entity_description = description - self._attr_unique_id = f"{coordinator._device_unique_id}_{description.key}" + self._attr_unique_id = f"{coordinator.device_unique_id}_{description.key}"