mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Make Anova device unique id public (#99147)
This commit is contained in:
parent
fbe2228c3f
commit
c88672c352
@ -30,7 +30,7 @@ class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]):
|
|||||||
update_interval=timedelta(seconds=30),
|
update_interval=timedelta(seconds=30),
|
||||||
)
|
)
|
||||||
assert self.config_entry is not None
|
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.anova_device = anova_device
|
||||||
self.device_info: DeviceInfo | None = None
|
self.device_info: DeviceInfo | None = None
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]):
|
|||||||
def async_setup(self, firmware_version: str) -> None:
|
def async_setup(self, firmware_version: str) -> None:
|
||||||
"""Set the firmware version info."""
|
"""Set the firmware version info."""
|
||||||
self.device_info = DeviceInfo(
|
self.device_info = DeviceInfo(
|
||||||
identifiers={(DOMAIN, self._device_unique_id)},
|
identifiers={(DOMAIN, self.device_unique_id)},
|
||||||
name="Anova Precision Cooker",
|
name="Anova Precision Cooker",
|
||||||
manufacturer="Anova",
|
manufacturer="Anova",
|
||||||
model="Precision Cooker",
|
model="Precision Cooker",
|
||||||
|
@ -28,4 +28,4 @@ class AnovaDescriptionEntity(AnovaEntity):
|
|||||||
"""Initialize the entity and declare unique id based on description key."""
|
"""Initialize the entity and declare unique id based on description key."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
self.entity_description = description
|
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}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user