187 files

This commit is contained in:
Home Assistant Version Control
2026-10-09 11:57:31 +00:00
parent 28fa34d78a
commit 1e1b12d52b
187 changed files with 40899 additions and 32654 deletions
+11 -2
View File
@@ -41,7 +41,13 @@ class _BaseAlbumSensor(SensorEntity):
def __init__(self, entry: ConfigEntry, coordinator: AlbumCoordinator) -> None:
self.entry = entry
self.coordinator = coordinator
coordinator.async_add_listener(self.async_write_ha_state)
async def async_added_to_hass(self) -> None:
await super().async_added_to_hass()
# Disabled entities are constructed but never added, so subscribe here.
self.async_on_remove(
self.coordinator.async_add_listener(self.async_write_ha_state)
)
@property
def device_info(self):
@@ -80,7 +86,10 @@ class HiddenPhotoCountSensor(_BaseAlbumSensor):
super().__init__(entry, coordinator)
self._attr_unique_id = f"{entry.entry_id}_hidden_photo_count"
self._attr_name = "Hidden photos"
coordinator.store.add_listener(self.async_write_ha_state)
async def async_added_to_hass(self) -> None:
await super().async_added_to_hass()
self.coordinator.store.add_listener(self.async_write_ha_state)
@property
def native_value(self):