From aab21105dac180dd2aa2c3f1de93106592ad4b60 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 18 Feb 2024 19:36:53 -0600 Subject: [PATCH] Convert config entry subscriptions to callback (#110900) --- homeassistant/components/config/config_entries.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/config/config_entries.py b/homeassistant/components/config/config_entries.py index 03b031fc1f1..52904cb8d35 100644 --- a/homeassistant/components/config/config_entries.py +++ b/homeassistant/components/config/config_entries.py @@ -26,8 +26,8 @@ from homeassistant.loader import ( Integration, IntegrationNotFound, async_get_config_flows, - async_get_integration, async_get_integrations, + async_get_loaded_integration, ) @@ -479,12 +479,13 @@ async def config_entries_subscribe( """Subscribe to config entry updates.""" type_filter = msg.get("type_filter") - async def async_forward_config_entry_changes( + @callback + def async_forward_config_entry_changes( change: config_entries.ConfigEntryChange, entry: config_entries.ConfigEntry ) -> None: """Forward config entry state events to websocket.""" if type_filter: - integration = await async_get_integration(hass, entry.domain) + integration = async_get_loaded_integration(hass, entry.domain) if integration.integration_type not in type_filter: return