Improve harmony typing (#107447)

This commit is contained in:
Marc Mueller 2024-01-07 20:35:55 +01:00 committed by GitHub
parent a9b51f0255
commit fd52172c33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 67 additions and 48 deletions

View file

@ -25,7 +25,7 @@ def find_best_name_for_remote(data: dict, harmony: HarmonyAPI):
return data[CONF_NAME]
async def get_harmony_client_if_available(ip_address: str):
async def get_harmony_client_if_available(ip_address: str) -> HarmonyAPI | None:
"""Connect to a harmony hub and fetch info."""
harmony = HarmonyAPI(ip_address=ip_address)