Include the first seen context data in the logbook api (#39194)
* Include the context_entity_id in the logbook api context_entity_id is the first entity seen during a time period that includes the context * update test * more of them * include friendly name * pylint wants a ternary * Refactor * performance * fix homekit context * Fix self describing events * Fix external_events
This commit is contained in:
1 parent
b1c0d8fb6c
commit
6b7a7939d2
9 files changed
+473
-101
No files matched your search
@@ -66,6 +66,9 @@ class _TemplateAttribute:
|
||||
last_result: Optional[str],
|
||||
result: Union[str, TemplateError],
|
||||
) -> None:
|
||||
if event:
|
||||
self._entity.async_set_context(event.context)
|
||||
|
||||
if isinstance(result, TemplateError):
|
||||
_LOGGER.error(
|
||||
"TemplateError('%s') "
|
||||
|
||||
Reference in new issue
Block a user