Ensure logbook entries appear when the logbook.log (#37388)

service without a domain or entity_id
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-07-02 19:53:28 -05:00
1 parent 91799e2b52
commit 7e664fbb3b
2 files changed
+27 -7

No files matched your search

@@ -112,6 +112,12 @@ async def async_setup(hass, config):
domain = service.data.get(ATTR_DOMAIN)
entity_id = service.data.get(ATTR_ENTITY_ID)
if entity_id is None and domain is None:
# If there is no entity_id or
# domain, the event will get filtered
# away so we use the "logbook" domain
domain = DOMAIN
message.hass = hass
message = message.async_render()
async_log_entry(hass, name, message, domain, entity_id)