1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Fix ESPHome state watching when new state is None (#59528)

This commit is contained in:
Jesse Hills
2021-11-15 04:49:45 +13:00
committed by GitHub
parent 3175bca37d
commit e5129042ad

View File

@@ -225,7 +225,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Forward Home Assistant states updates to ESPHome."""
# Only communicate changes to the state or attribute tracked
if (
if event.data.get("new_state") is None or (
event.data.get("old_state") is not None
and "new_state" in event.data
and (