mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Strip microseconds on state.last_updated
This commit is contained in:
parent
10a5db7924
commit
040dd3c409
@ -496,7 +496,8 @@ class State(object):
|
|||||||
self.entity_id = entity_id.lower()
|
self.entity_id = entity_id.lower()
|
||||||
self.state = state
|
self.state = state
|
||||||
self.attributes = attributes or {}
|
self.attributes = attributes or {}
|
||||||
self.last_updated = last_updated or date_util.utcnow()
|
self.last_updated = date_util.strip_microseconds(
|
||||||
|
last_updated or date_util.utcnow())
|
||||||
|
|
||||||
# Strip microsecond from last_changed else we cannot guarantee
|
# Strip microsecond from last_changed else we cannot guarantee
|
||||||
# state == State.from_dict(state.as_dict())
|
# state == State.from_dict(state.as_dict())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user