mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Adjust type hints in CloudClient (#92465)
This commit is contained in:
parent
46bf0e59f3
commit
78da1168db
@ -76,7 +76,7 @@ class CloudClient(Interface):
|
|||||||
return self._hass.http.runner
|
return self._hass.http.runner
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cloudhooks(self) -> dict[str, dict[str, str]]:
|
def cloudhooks(self) -> dict[str, dict[str, str | bool]]:
|
||||||
"""Return list of cloudhooks."""
|
"""Return list of cloudhooks."""
|
||||||
return self._prefs.cloudhooks
|
return self._prefs.cloudhooks
|
||||||
|
|
||||||
@ -97,8 +97,6 @@ class CloudClient(Interface):
|
|||||||
if self._alexa_config is not None:
|
if self._alexa_config is not None:
|
||||||
return self._alexa_config
|
return self._alexa_config
|
||||||
|
|
||||||
assert self.cloud is not None
|
|
||||||
|
|
||||||
cloud_user = await self._prefs.get_cloud_user()
|
cloud_user = await self._prefs.get_cloud_user()
|
||||||
|
|
||||||
alexa_conf = alexa_config.CloudAlexaConfig(
|
alexa_conf = alexa_config.CloudAlexaConfig(
|
||||||
@ -120,8 +118,6 @@ class CloudClient(Interface):
|
|||||||
if self._google_config is not None:
|
if self._google_config is not None:
|
||||||
return self._google_config
|
return self._google_config
|
||||||
|
|
||||||
assert self.cloud is not None
|
|
||||||
|
|
||||||
cloud_user = await self._prefs.get_cloud_user()
|
cloud_user = await self._prefs.get_cloud_user()
|
||||||
|
|
||||||
google_conf = google_config.CloudGoogleConfig(
|
google_conf = google_config.CloudGoogleConfig(
|
||||||
@ -270,6 +266,8 @@ class CloudClient(Interface):
|
|||||||
if payload and (region := payload.get("region")):
|
if payload and (region := payload.get("region")):
|
||||||
self._relayer_region = region
|
self._relayer_region = region
|
||||||
|
|
||||||
async def async_cloudhooks_update(self, data: dict[str, dict[str, str]]) -> None:
|
async def async_cloudhooks_update(
|
||||||
|
self, data: dict[str, dict[str, str | bool]]
|
||||||
|
) -> None:
|
||||||
"""Update local list of cloudhooks."""
|
"""Update local list of cloudhooks."""
|
||||||
await self._prefs.async_update(cloudhooks=data)
|
await self._prefs.async_update(cloudhooks=data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user