Do not report state when closing down (#32168)

pull/32184/head
Paulus Schoutsen 2020-02-25 09:05:36 -08:00 committed by GitHub
parent 5488389244
commit 900714a3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,9 @@ async def async_enable_proactive_mode(hass, smart_home_config):
await smart_home_config.async_get_access_token()
async def async_entity_state_listener(changed_entity, old_state, new_state):
if not hass.is_running:
return
if not new_state:
return

View File

@ -21,6 +21,9 @@ def async_enable_report_state(hass: HomeAssistant, google_config: AbstractConfig
"""Enable state reporting."""
async def async_entity_state_listener(changed_entity, old_state, new_state):
if not hass.is_running:
return
if not new_state:
return