Sync empty entities when Google is disabled in cloud (#72806)

This commit is contained in:
Paulus Schoutsen
2022-06-23 05:41:34 -04:00
committed by GitHub
parent 0dd181f922
commit 10b083bbf5
5 changed files with 44 additions and 13 deletions

View File

@@ -210,11 +210,11 @@ class CloudClient(Interface):
async def async_google_message(self, payload: dict[Any, Any]) -> dict[Any, Any]:
"""Process cloud google message to client."""
if not self._prefs.google_enabled:
return ga.turned_off_response(payload)
gconf = await self.get_google_config()
if not self._prefs.google_enabled:
return ga.api_disabled_response(payload, gconf.agent_user_id)
return await ga.async_handle_message(
self._hass, gconf, gconf.cloud_user, payload, gc.SOURCE_CLOUD
)