Strip microseconds on state.last_updated
This commit is contained in:
parent
10a5db7924
commit
040dd3c409
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue