This commit is contained in:
Home Assistant Version Control
2026-07-28 23:36:28 +00:00
parent 09f59132f8
commit c76ae7044c
3 changed files with 27 additions and 18 deletions
@@ -725,10 +725,19 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
)
try:
await client.async_login(otp_code=otp or None)
# Albums and category browsing live only in the Personal space
# (there is no Shared Space album/category API). For the Shared
# Space, validate access up front so a permission problem
# surfaces here, not later.
except syn_api.SynologyOtpRequired:
errors["otp_code"] = "synology_otp_required"
except Exception: # noqa: BLE001 - any failure means bad URL/creds
errors["base"] = "synology_cannot_connect"
if not errors:
# Login worked, so the URL and credentials are fine. Albums and
# category browsing live only in the Personal space (there is no
# Shared Space album/category API). For the Shared Space we just
# validate access up front; any failure here means the Shared
# Space is not enabled or this account cannot reach it, not a
# credentials problem.
try:
if space == SYNOLOGY_SPACE_SHARED:
albums = people = places = tags = subjects = []
await client.async_collect_assets(None)
@@ -738,13 +747,13 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
places = await client.async_list_places()
tags = await client.async_list_tags()
subjects = await client.async_list_subjects()
except syn_api.SynologyOtpRequired:
errors["otp_code"] = "synology_otp_required"
except syn_api.SynologyPermissionError:
except Exception: # noqa: BLE001
if space == SYNOLOGY_SPACE_SHARED:
errors["base"] = "synology_shared_unavailable"
except Exception: # noqa: BLE001 - any failure means bad URL/creds
errors["base"] = "synology_cannot_connect"
else:
errors["base"] = "synology_cannot_connect"
if not errors:
self._syn_url = client.base_url
self._syn_username = username
self._syn_password = password
@@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/eyalgal/album_slideshow/issues",
"requirements": ["Pillow"],
"version": "1.6.0"
"version": "1.6.2"
}
@@ -26,7 +26,7 @@
* tap_action: none # none | more-info
*/
const VERSION = "1.6.0";
const VERSION = "1.6.2";
const ANIMATED_TRANSITIONS = [
"fade",