Skip to content

Commit b597ff1

Browse files
committed
Initialize image access tokens
- seed ImageEntity access tokens to avoid startup error - bump version to 1.1.4
1 parent 61f9065 commit b597ff1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

custom_components/sharepoint_photos/image.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class SharePointPhotosCurrentImage(CoordinatorEntity, ImageEntity):
3636
def __init__(self, coordinator, config_entry: ConfigEntry) -> None:
3737
CoordinatorEntity.__init__(self, coordinator)
3838
ImageEntity.__init__(self, coordinator.hass)
39+
if not hasattr(self, "access_tokens"):
40+
self.access_tokens = []
41+
if not self.access_tokens:
42+
self.async_update_token()
3943
self._config_entry = config_entry
4044
site_name = config_entry.data.get("site_url", "").replace("https://", "").replace("/", "_")
4145
self._attr_unique_id = f"{DOMAIN}_{site_name}_current_image"

custom_components/sharepoint_photos/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"aiohttp>=3.8.0",
1414
"msal>=1.20.0"
1515
],
16-
"version": "1.1.3"
16+
"version": "1.1.4"
1717
}

0 commit comments

Comments
 (0)