From 57a74e1d25782e43861e41c8c6e295f47e34f480 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 11 Sep 2026 12:01:26 +0200 Subject: [PATCH] Adjust logbook to not access DeviceEntry.config_entries (#181891) --- homeassistant/components/logbook/helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/logbook/helpers.py b/homeassistant/components/logbook/helpers.py index 8002a4f0bce3..83aa1a586140 100644 --- a/homeassistant/components/logbook/helpers.py +++ b/homeassistant/components/logbook/helpers.py @@ -68,8 +68,12 @@ def _async_config_entries_for_ids( if device_ids: dev_reg = dr.async_get(hass) for device_id in device_ids: - if (device := dev_reg.async_get(device_id)) and device.config_entries: + if not (device := dev_reg.async_get(device_id)): + continue + if device.is_composite_device: config_entry_ids |= device.config_entries + else: + config_entry_ids.add(device.config_entry_id) return config_entry_ids