mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix ESPHome state watching when new state is None (#59528)
This commit is contained in:
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."""
|
"""Forward Home Assistant states updates to ESPHome."""
|
||||||
|
|
||||||
# Only communicate changes to the state or attribute tracked
|
# 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
|
event.data.get("old_state") is not None
|
||||||
and "new_state" in event.data
|
and "new_state" in event.data
|
||||||
and (
|
and (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user