From 535ae56fe77f72d8950f1cba7632d459721fe9c7 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 13 May 2022 16:17:41 -0400 Subject: [PATCH] Remove unused entity_id argument in logbook context augmenter (#71829) --- homeassistant/components/logbook/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/logbook/__init__.py b/homeassistant/components/logbook/__init__.py index fae979445fd..351b121a166 100644 --- a/homeassistant/components/logbook/__init__.py +++ b/homeassistant/components/logbook/__init__.py @@ -413,7 +413,7 @@ def _humanify( if icon := _row_attributes_extract(row, ICON_JSON_EXTRACT): data[LOGBOOK_ENTRY_ICON] = icon - context_augmenter.augment(data, entity_id, row) + context_augmenter.augment(data, row) yield data elif event_type in external_events: @@ -421,7 +421,7 @@ def _humanify( data = describe_event(event_cache.get(row)) data[LOGBOOK_ENTRY_WHEN] = format_time(row) data[LOGBOOK_ENTRY_DOMAIN] = domain - context_augmenter.augment(data, data.get(ATTR_ENTITY_ID), row) + context_augmenter.augment(data, row) yield data elif event_type == EVENT_LOGBOOK_ENTRY: @@ -441,7 +441,7 @@ def _humanify( LOGBOOK_ENTRY_DOMAIN: domain, LOGBOOK_ENTRY_ENTITY_ID: entity_id, } - context_augmenter.augment(data, entity_id, row) + context_augmenter.augment(data, row) yield data @@ -562,7 +562,7 @@ class ContextAugmenter: self.external_events = external_events self.event_cache = event_cache - def augment(self, data: dict[str, Any], entity_id: str | None, row: Row) -> None: + def augment(self, data: dict[str, Any], row: Row) -> None: """Augment data from the row and cache.""" if context_user_id := row.context_user_id: data[CONTEXT_USER_ID] = context_user_id