From b8ac86939b0d4fd21d48c82c48b581d6f6fe97bc Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:49:06 +0200 Subject: [PATCH] Fix implicit-return in smartthings (#122927) --- homeassistant/components/smartthings/smartapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/smartthings/smartapp.py b/homeassistant/components/smartthings/smartapp.py index e2593dd7b10..6b0da00b132 100644 --- a/homeassistant/components/smartthings/smartapp.py +++ b/homeassistant/components/smartthings/smartapp.py @@ -16,6 +16,7 @@ from pysmartthings import ( CAPABILITIES, CLASSIFICATION_AUTOMATION, App, + AppEntity, AppOAuth, AppSettings, InstalledAppStatus, @@ -63,7 +64,7 @@ def format_unique_id(app_id: str, location_id: str) -> str: return f"{app_id}_{location_id}" -async def find_app(hass: HomeAssistant, api): +async def find_app(hass: HomeAssistant, api: SmartThings) -> AppEntity | None: """Find an existing SmartApp for this installation of hass.""" apps = await api.apps() for app in [app for app in apps if app.app_name.startswith(APP_NAME_PREFIX)]: @@ -74,6 +75,7 @@ async def find_app(hass: HomeAssistant, api): == hass.data[DOMAIN][CONF_INSTANCE_ID] ): return app + return None async def validate_installed_app(api, installed_app_id: str):