Add entity glob matching support to history (#40387)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-09-28 15:58:55 +02:00
1 parent e08ee282ab
commit a19e10c57a
4 files changed
+561 -501

No files matched your search

@@ -591,9 +591,6 @@ def _keep_event(hass, event, entities_filter):
if event.event_type in HOMEASSISTANT_EVENTS:
return entities_filter is None or entities_filter(HA_DOMAIN_ENTITY_ID)
if event.event_type == EVENT_STATE_CHANGED:
return entities_filter is None or entities_filter(event.entity_id)
entity_id = event.data_entity_id
if entity_id:
return entities_filter is None or entities_filter(entity_id)