Add album metadata attributes to Album ID sensor
All checks were successful
Validate / Hassfest (push) Successful in 4s
All checks were successful
Validate / Hassfest (push) Successful in 4s
Add asset_count, last_updated, and created_at attributes to the Album ID sensor for convenient access to album metadata. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user