From 5f7d98f15bd87a88a6b4814e34a7b5524bb2fde6 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 18 Apr 2023 15:27:14 +0200 Subject: [PATCH] Improve comment in conversation (#91595) --- homeassistant/components/conversation/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/conversation/__init__.py b/homeassistant/components/conversation/__init__.py index 46a060f99bf..f1640a9ce64 100644 --- a/homeassistant/components/conversation/__init__.py +++ b/homeassistant/components/conversation/__init__.py @@ -383,10 +383,12 @@ class AgentManager: for agent_id, agent in self._agents.items(): config_entry = self.hass.config_entries.async_get_entry(agent_id) - # This is a bug, agent should have been unset when config entry was unloaded + # Guard against potential bugs in conversation agents where the agent is not + # removed from the manager when the config entry is removed if config_entry is None: _LOGGER.warning( - "Agent was still loaded while config entry is gone: %s", agent + "Conversation agent %s is still loaded after config entry removal", + agent, ) continue