Fix ESPHome state watching when new state is None (#59528)
parent
3175bca37d
commit
e5129042ad
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue