mirror of
https://github.com/home-assistant/core.git
synced 2025-08-10 16:15:08 +02:00
Fix implicit-return in smartthings (#122927)
This commit is contained in:
@@ -16,6 +16,7 @@ from pysmartthings import (
|
|||||||
CAPABILITIES,
|
CAPABILITIES,
|
||||||
CLASSIFICATION_AUTOMATION,
|
CLASSIFICATION_AUTOMATION,
|
||||||
App,
|
App,
|
||||||
|
AppEntity,
|
||||||
AppOAuth,
|
AppOAuth,
|
||||||
AppSettings,
|
AppSettings,
|
||||||
InstalledAppStatus,
|
InstalledAppStatus,
|
||||||
@@ -63,7 +64,7 @@ def format_unique_id(app_id: str, location_id: str) -> str:
|
|||||||
return f"{app_id}_{location_id}"
|
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."""
|
"""Find an existing SmartApp for this installation of hass."""
|
||||||
apps = await api.apps()
|
apps = await api.apps()
|
||||||
for app in [app for app in apps if app.app_name.startswith(APP_NAME_PREFIX)]:
|
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]
|
== hass.data[DOMAIN][CONF_INSTANCE_ID]
|
||||||
):
|
):
|
||||||
return app
|
return app
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
async def validate_installed_app(api, installed_app_id: str):
|
async def validate_installed_app(api, installed_app_id: str):
|
||||||
|
Reference in New Issue
Block a user