mirror of
https://github.com/home-assistant/core.git
synced 2025-04-19 14:57:52 +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.state = state
|
||||
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
|
||||
# state == State.from_dict(state.as_dict())
|
||||
|
Loading…
x
Reference in New Issue
Block a user