diff --git a/homeassistant/components/ollama/conversation.py b/homeassistant/components/ollama/conversation.py index 9f66083f506..c0423b258f0 100644 --- a/homeassistant/components/ollama/conversation.py +++ b/homeassistant/components/ollama/conversation.py @@ -346,9 +346,5 @@ class OllamaConversationEntity( self, hass: HomeAssistant, entry: ConfigEntry ) -> None: """Handle options update.""" - if entry.options.get(CONF_LLM_HASS_API): - self._attr_supported_features = ( - conversation.ConversationEntityFeature.CONTROL - ) - else: - self._attr_supported_features = conversation.ConversationEntityFeature(0) + # Reload as we update device info + entity name + supported features + await hass.config_entries.async_reload(entry.entry_id) diff --git a/homeassistant/components/openai_conversation/conversation.py b/homeassistant/components/openai_conversation/conversation.py index b482126e27c..a7109a6d6ec 100644 --- a/homeassistant/components/openai_conversation/conversation.py +++ b/homeassistant/components/openai_conversation/conversation.py @@ -328,9 +328,5 @@ class OpenAIConversationEntity( self, hass: HomeAssistant, entry: ConfigEntry ) -> None: """Handle options update.""" - if entry.options.get(CONF_LLM_HASS_API): - self._attr_supported_features = ( - conversation.ConversationEntityFeature.CONTROL - ) - else: - self._attr_supported_features = conversation.ConversationEntityFeature(0) + # Reload as we update device info + entity name + supported features + await hass.config_entries.async_reload(entry.entry_id) diff --git a/tests/components/ollama/conftest.py b/tests/components/ollama/conftest.py index 0355a13eba7..b28b8850cd5 100644 --- a/tests/components/ollama/conftest.py +++ b/tests/components/ollama/conftest.py @@ -48,6 +48,7 @@ async def mock_init_component(hass: HomeAssistant, mock_config_entry: MockConfig ): assert await async_setup_component(hass, ollama.DOMAIN, {}) await hass.async_block_till_done() + yield @pytest.fixture(autouse=True) diff --git a/tests/components/ollama/test_conversation.py b/tests/components/ollama/test_conversation.py index c83dce3b565..cb56b398342 100644 --- a/tests/components/ollama/test_conversation.py +++ b/tests/components/ollama/test_conversation.py @@ -312,6 +312,7 @@ async def test_unknown_hass_api( CONF_LLM_HASS_API: "non-existing", }, ) + await hass.async_block_till_done() result = await conversation.async_converse( hass, "hello", None, Context(), agent_id=mock_config_entry.entry_id