diff --git a/README.md b/README.md index 1c43f8a..70231b5 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ If no external domain is configured in Immich, all URLs will use the Server URL | Entity Type | Name | Description | |-------------|------|-------------| -| Sensor | Album ID | Album identifier with `album_name` and `share_url` attributes | +| Sensor | Album ID | Album identifier with `album_name`, `asset_count`, `share_url`, `last_updated`, and `created_at` attributes | | Sensor | Asset Count | Total number of assets (includes `people` list in attributes) | | Sensor | Photo Count | Number of photos in the album | | Sensor | Video Count | Number of videos in the album | diff --git a/custom_components/immich_album_watcher/sensor.py b/custom_components/immich_album_watcher/sensor.py index cab738e..d7ef735 100644 --- a/custom_components/immich_album_watcher/sensor.py +++ b/custom_components/immich_album_watcher/sensor.py @@ -24,6 +24,7 @@ from homeassistant.util import slugify from .const import ( ATTR_ALBUM_ID, + ATTR_ALBUM_NAME, ATTR_ALBUM_PROTECTED_URL, ATTR_ALBUM_URLS, ATTR_ASSET_COUNT, @@ -1211,7 +1212,10 @@ class ImmichAlbumIdSensor(ImmichAlbumBaseSensor): return {} attrs: dict[str, Any] = { - "album_name": self._album_data.name, + ATTR_ALBUM_NAME: self._album_data.name, + ATTR_ASSET_COUNT: self._album_data.asset_count, + ATTR_LAST_UPDATED: self._album_data.updated_at, + ATTR_CREATED_AT: self._album_data.created_at, } # Primary share URL (prefers public, falls back to protected)