Add automation and script events to logbook filter events (#19253)

* Add automation and script events to logbook filter events

* Update logbook.py

* Update logbook.py

* Update logbook tests

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py
This commit is contained in:
Luca Angemi authored and Paulus Schoutsen committed 2018-12-14 10:25:02 +01:00
1 parent 4f98818258
commit fb680bc1e4
2 files changed
+43 -7

No files matched your search

+8
View File
@@ -469,6 +469,14 @@ def _exclude_events(events, entities_filter):
domain = event.data.get(ATTR_DOMAIN)
entity_id = event.data.get(ATTR_ENTITY_ID)
elif event.event_type == EVENT_AUTOMATION_TRIGGERED:
domain = 'automation'
entity_id = event.data.get(ATTR_ENTITY_ID)
elif event.event_type == EVENT_SCRIPT_STARTED:
domain = 'script'
entity_id = event.data.get(ATTR_ENTITY_ID)
elif event.event_type == EVENT_ALEXA_SMART_HOME:
domain = 'alexa'