Filter new entities from logbook (#5402)

This commit is contained in:
Adam Mills authored and Paulus Schoutsen committed 2017-01-19 23:30:47 -08:00
1 parent 5dd45efac3
commit 1f6f9a1677
2 files changed
+48

No files matched your search

+4
View File
@@ -307,6 +307,10 @@ def _exclude_events(events, config):
if event.event_type == EVENT_STATE_CHANGED:
to_state = State.from_dict(event.data.get('new_state'))
# Do not report on new entities
if event.data.get('old_state') is None:
continue
# Do not report on entity removal
if not to_state:
continue