Fix geniushub type hint (#87258)

pull/87324/head
epenet 2023-02-03 17:10:01 +01:00 committed by GitHub
parent 9400dac905
commit ad039b5ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -174,7 +174,9 @@ def setup_service_functions(hass: HomeAssistant, broker):
class GeniusBroker:
"""Container for geniushub client and data."""
def __init__(self, hass, client, hub_uid) -> None:
def __init__(
self, hass: HomeAssistant, client: GeniusHub, hub_uid: str | None
) -> None:
"""Initialize the geniushub client."""
self.hass = hass
self.client = client
@ -182,7 +184,7 @@ class GeniusBroker:
self._connect_error = False
@property
def hub_uid(self) -> int:
def hub_uid(self) -> str:
"""Return the Hub UID (MAC address)."""
return self._hub_uid if self._hub_uid is not None else self.client.uid