Tune logbook performance to accomodate recent changes (#39348)

This commit is contained in:
J. Nick Koston 2020-08-30 02:20:31 -05:00 committed by GitHub
parent ad0d3b4848
commit dda4cf4d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 17 deletions

View file

@ -12,10 +12,11 @@ def async_describe_events(hass, async_describe_event):
@callback
def async_describe_logbook_event(event):
"""Describe the logbook event."""
data = event.data
return {
"name": event.data.get(ATTR_NAME),
"name": data.get(ATTR_NAME),
"message": "started",
"entity_id": event.data.get(ATTR_ENTITY_ID),
"entity_id": data.get(ATTR_ENTITY_ID),
}
async_describe_event(DOMAIN, EVENT_SCRIPT_STARTED, async_describe_logbook_event)