Style fixes

This commit is contained in:
Paulus Schoutsen 2015-04-01 07:18:03 -07:00
parent 57b3e8018b
commit e43eee2eb1
2 changed files with 5 additions and 1 deletions

View file

@ -463,6 +463,7 @@ class State(object):
__slots__ = ['entity_id', 'state', 'attributes',
'last_changed', 'last_updated']
# pylint: disable=too-many-arguments
def __init__(self, entity_id, state, attributes=None, last_changed=None,
last_updated=None):
if not ENTITY_ID_PATTERN.match(entity_id):

View file

@ -122,7 +122,10 @@ def humanify(events):
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
domain = to_state.domain