From fd5c633e1ee98993474026528cbec892058a988d Mon Sep 17 00:00:00 2001 From: mib1185 Date: Sun, 22 Jun 2025 18:38:34 +0000 Subject: [PATCH] improve typing for config entry --- homeassistant/components/immich/services.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/immich/services.py b/homeassistant/components/immich/services.py index 48859c1ad00..305e9287c9b 100644 --- a/homeassistant/components/immich/services.py +++ b/homeassistant/components/immich/services.py @@ -11,7 +11,7 @@ from homeassistant.core import HomeAssistant, ServiceCall from homeassistant.exceptions import ServiceValidationError from .const import DOMAIN -from .coordinator import ImmichDataUpdateCoordinator +from .coordinator import ImmichConfigEntry _LOGGER = logging.getLogger(__name__) @@ -37,7 +37,7 @@ async def _async_upload_file(service_call: ServiceCall) -> None: service_call.data, ) hass = service_call.hass - target_entry = hass.config_entries.async_get_entry( + target_entry: ImmichConfigEntry | None = hass.config_entries.async_get_entry( service_call.data[CONF_CONFIG_ENTRY_ID] ) target_file = service_call.data[CONF_FILE] @@ -66,7 +66,7 @@ async def _async_upload_file(service_call: ServiceCall) -> None: }, ) - coordinator: ImmichDataUpdateCoordinator = target_entry.runtime_data + coordinator = target_entry.runtime_data if target_album := service_call.data.get(CONF_ALBUM_ID): try: