Sync empty entities when Google is disabled in cloud (#72806)
This commit is contained in:
parent
0dd181f922
commit
10b083bbf5
5 changed files with 44 additions and 13 deletions
|
@ -356,9 +356,6 @@ class AbstractConfig(ABC):
|
|||
pprint.pformat(payload),
|
||||
)
|
||||
|
||||
if not self.enabled:
|
||||
return json_response(smart_home.turned_off_response(payload))
|
||||
|
||||
if (agent_user_id := self.get_local_agent_user_id(webhook_id)) is None:
|
||||
# No agent user linked to this webhook, means that the user has somehow unregistered
|
||||
# removing webhook and stopping processing of this request.
|
||||
|
@ -370,6 +367,11 @@ class AbstractConfig(ABC):
|
|||
webhook.async_unregister(self.hass, webhook_id)
|
||||
return None
|
||||
|
||||
if not self.enabled:
|
||||
return json_response(
|
||||
smart_home.api_disabled_response(payload, agent_user_id)
|
||||
)
|
||||
|
||||
result = await smart_home.async_handle_message(
|
||||
self.hass,
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue