mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix implicit-return in smartthings (#122927)
This commit is contained in:
parent
9023d80d1b
commit
b8ac86939b
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user