Ensure logbook entries appear when the logbook.log (#37388)
service without a domain or entity_id
This commit is contained in:
1 parent
ed086e5200
commit
d7ecbb8ebe
2 files changed
+27
-7
No files matched your search
@@ -117,6 +117,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)
|
||||
|
||||
Reference in new issue
Block a user