Do not report google states if nothing to report (#38608)

This commit is contained in:
Paulus Schoutsen 2020-08-07 08:16:46 +02:00 committed by GitHub
parent 5cc7605d20
commit 6d0d5548e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,9 @@ def async_enable_report_state(hass: HomeAssistant, google_config: AbstractConfig
except SmartHomeError:
continue
if not entities:
return
await google_config.async_report_state_all({"devices": {"states": entities}})
async_call_later(hass, INITIAL_REPORT_DELAY, inital_report)