mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 18:57:57 +00:00
Style fixes
This commit is contained in:
parent
57b3e8018b
commit
e43eee2eb1
@ -463,6 +463,7 @@ class State(object):
|
|||||||
__slots__ = ['entity_id', 'state', 'attributes',
|
__slots__ = ['entity_id', 'state', 'attributes',
|
||||||
'last_changed', 'last_updated']
|
'last_changed', 'last_updated']
|
||||||
|
|
||||||
|
# pylint: disable=too-many-arguments
|
||||||
def __init__(self, entity_id, state, attributes=None, last_changed=None,
|
def __init__(self, entity_id, state, attributes=None, last_changed=None,
|
||||||
last_updated=None):
|
last_updated=None):
|
||||||
if not ENTITY_ID_PATTERN.match(entity_id):
|
if not ENTITY_ID_PATTERN.match(entity_id):
|
||||||
|
@ -122,7 +122,10 @@ def humanify(events):
|
|||||||
|
|
||||||
to_state = State.from_dict(event.data.get('new_state'))
|
to_state = State.from_dict(event.data.get('new_state'))
|
||||||
|
|
||||||
if not to_state or to_state.last_changed != to_state.last_updated:
|
# if last_changed == last_updated only attributes have changed
|
||||||
|
# we do not report on that yet.
|
||||||
|
if not to_state or \
|
||||||
|
to_state.last_changed != to_state.last_updated:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
domain = to_state.domain
|
domain = to_state.domain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user