Guard logbook assuming entity ID is a string (#50047)

This commit is contained in:
Paulus Schoutsen
2021-05-04 14:23:22 -07:00
parent 46a3b26b67
commit 14e02b1bca

View File

@@ -647,7 +647,7 @@ def _augment_data_with_context(
return
attr_entity_id = event_data.get(ATTR_ENTITY_ID)
if not attr_entity_id or (
if not isinstance(attr_entity_id, str) or (
event_type in SCRIPT_AUTOMATION_EVENTS and attr_entity_id == entity_id
):
return