From e43eee2eb13a00b7e7ab4f9e190e8dfc0e9266db Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen <paulus@paulusschoutsen.nl>
Date: Wed, 1 Apr 2015 07:18:03 -0700
Subject: [PATCH] Style fixes

---
 homeassistant/__init__.py           | 1 +
 homeassistant/components/logbook.py | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/homeassistant/__init__.py b/homeassistant/__init__.py
index 898b66c4ef9..5e54cbd5d0a 100644
--- a/homeassistant/__init__.py
+++ b/homeassistant/__init__.py
@@ -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):
diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py
index 3b42ffdee57..a8299fbd6ed 100644
--- a/homeassistant/components/logbook.py
+++ b/homeassistant/components/logbook.py
@@ -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
-- 
GitLab