mirror of
https://github.com/home-assistant/core.git
synced 2025-08-08 07:05:07 +02:00
Update state automation to work with new and deleted state changes
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user