Filter new entities from logbook (#5402)
This commit is contained in:
1 parent
5dd45efac3
commit
1f6f9a1677
2 files changed
+48
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user