mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Reload config entry for anthropic on update (#123280)
* Reload config entry for anthropic on update * Fix tests
This commit is contained in:
parent
799888df2f
commit
45ce0fed0a
@ -312,9 +312,5 @@ class AnthropicConversationEntity(
|
||||
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)
|
||||
|
@ -43,6 +43,7 @@ async def mock_init_component(hass, mock_config_entry):
|
||||
):
|
||||
assert await async_setup_component(hass, "anthropic", {})
|
||||
await hass.async_block_till_done()
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user