Fixes for logbook filtering and add it to the live stream (#72501)

This commit is contained in:
J. Nick Koston 2022-05-25 15:17:08 -10:00 committed by GitHub
parent 1ac71455cb
commit bfa7693d18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 340 additions and 114 deletions

View file

@ -510,7 +510,7 @@ async def test_exclude_described_event(hass, hass_client, recorder_mock):
return {
"name": "Test Name",
"message": "tested a message",
"entity_id": event.data.get(ATTR_ENTITY_ID),
"entity_id": event.data[ATTR_ENTITY_ID],
}
def async_describe_events(hass, async_describe_event):
@ -2003,13 +2003,12 @@ async def test_include_events_domain_glob(hass, hass_client, recorder_mock):
)
await async_recorder_block_till_done(hass)
# Should get excluded by domain
hass.bus.async_fire(
logbook.EVENT_LOGBOOK_ENTRY,
{
logbook.ATTR_NAME: "Alarm",
logbook.ATTR_MESSAGE: "is triggered",
logbook.ATTR_DOMAIN: "switch",
logbook.ATTR_ENTITY_ID: "switch.any",
},
)
hass.bus.async_fire(EVENT_HOMEASSISTANT_START)