291 files

This commit is contained in:
Home Assistant Version Control
2026-10-14 18:10:18 +00:00
parent c4e0178d8a
commit 280501d2e8
291 changed files with 32540 additions and 3280 deletions
@@ -481,7 +481,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return
cam = data.get("camera")
if cam:
await cam.async_force_next()
await cam.async_force_next(_displayed_frame_id(call))
async def _previous_slide(call) -> None:
entry_id = call.data.get(ATTR_ENTRY_ID)
@@ -492,7 +492,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return
cam = data.get("camera")
if cam:
await cam.async_force_prev()
await cam.async_force_prev(_displayed_frame_id(call))
async def _refresh_album(call) -> None:
entry_id = call.data.get(ATTR_ENTRY_ID)
@@ -529,6 +529,12 @@ async def _async_update_listener(hass: HomeAssistant, entry: ConfigEntry) -> Non
await hass.config_entries.async_reload(entry.entry_id)
def _displayed_frame_id(call) -> int | None:
"""Optional frame a card is showing, so navigation starts from it."""
frame_id = call.data.get("frame_id")
return frame_id if type(frame_id) is int and frame_id >= 0 else None
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
if unload_ok: