Migrate google_assistant_sdk to use async_update_entry to alter config entries (#110307)
parent
8376c07969
commit
b5d9f275b9
|
@ -131,7 +131,9 @@ async def test_send_text_command(
|
|||
assert len(entries) == 1
|
||||
assert entries[0].state is ConfigEntryState.LOADED
|
||||
if configured_language_code:
|
||||
entries[0].options = {"language_code": configured_language_code}
|
||||
hass.config_entries.async_update_entry(
|
||||
entries[0], options={"language_code": configured_language_code}
|
||||
)
|
||||
|
||||
command = "turn on home assistant unsupported device"
|
||||
with patch(
|
||||
|
|
|
@ -33,7 +33,9 @@ async def test_broadcast_no_targets(
|
|||
await setup_integration()
|
||||
|
||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
||||
entry.options = {"language_code": language_code}
|
||||
hass.config_entries.async_update_entry(
|
||||
entry, options={"language_code": language_code}
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant"
|
||||
|
@ -87,7 +89,9 @@ async def test_broadcast_one_target(
|
|||
await setup_integration()
|
||||
|
||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
||||
entry.options = {"language_code": language_code}
|
||||
hass.config_entries.async_update_entry(
|
||||
entry, options={"language_code": language_code}
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
|
||||
|
|
Loading…
Reference in New Issue