mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Update state automation to work with new and deleted state changes
This commit is contained in:
parent
70ea16bdc0
commit
3492545ec1
@ -80,7 +80,8 @@ def async_trigger(hass, config, action):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# If only state attributes changed, ignore this event
|
# If only state attributes changed, ignore this event
|
||||||
if from_s.last_changed == to_s.last_changed:
|
if (from_s is not None and to_s is not None and
|
||||||
|
from_s.last_changed == to_s.last_changed):
|
||||||
return
|
return
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user