1
mirror of https://github.com/home-assistant/core synced 2024-09-06 10:29:55 +02:00

Fix attribute access on None on startup in ESPHome (#56105)

This commit is contained in:
Oxan van Leeuwen 2021-09-11 20:53:29 +02:00 committed by GitHub
parent cb8c0cb123
commit 6e7ce89c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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