File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
custom_components/pyscript Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1212
1313_LOGGER = logging .getLogger (LOGGER_PATH + ".state" )
1414
15+ STATE_VIRTUAL_ATTRS = {"last_updated" , "last_changed" }
1516
1617class StateVar (str ):
1718 """Class for representing the value and attributes of a state variable."""
Original file line number Diff line number Diff line change 1717from .eval import AstEval
1818from .event import Event
1919from .function import Function
20- from .state import State
20+ from .state import State , STATE_VIRTUAL_ATTRS
2121
2222_LOGGER = logging .getLogger (LOGGER_PATH + ".trigger" )
2323
@@ -675,7 +675,7 @@ def ident_any_values_changed(self, func_args):
675675 all_attributes |= set (value .__dict__ .keys ())
676676 if old_value is not None :
677677 all_attributes |= set (old_value .__dict__ .keys ())
678- all_attributes -= { "last_updated" , "last_changed" }
678+ all_attributes -= STATE_VIRTUAL_ATTRS
679679 for attribute in all_attributes :
680680 attrib_val = getattr (value , attribute , None )
681681 attrib_old_val = getattr (old_value , attribute , None )
You can’t perform that action at this time.
0 commit comments