mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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
|
self, hass: HomeAssistant, entry: ConfigEntry
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle options update."""
|
"""Handle options update."""
|
||||||
if entry.options.get(CONF_LLM_HASS_API):
|
# Reload as we update device info + entity name + supported features
|
||||||
self._attr_supported_features = (
|
await hass.config_entries.async_reload(entry.entry_id)
|
||||||
conversation.ConversationEntityFeature.CONTROL
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self._attr_supported_features = conversation.ConversationEntityFeature(0)
|
|
||||||
|
@ -43,6 +43,7 @@ async def mock_init_component(hass, mock_config_entry):
|
|||||||
):
|
):
|
||||||
assert await async_setup_component(hass, "anthropic", {})
|
assert await async_setup_component(hass, "anthropic", {})
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user