mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Migrate google_assistant_sdk to use async_update_entry to alter config entries (#110307)
This commit is contained in:
parent
8376c07969
commit
b5d9f275b9
@ -131,7 +131,9 @@ async def test_send_text_command(
|
|||||||
assert len(entries) == 1
|
assert len(entries) == 1
|
||||||
assert entries[0].state is ConfigEntryState.LOADED
|
assert entries[0].state is ConfigEntryState.LOADED
|
||||||
if configured_language_code:
|
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"
|
command = "turn on home assistant unsupported device"
|
||||||
with patch(
|
with patch(
|
||||||
|
@ -33,7 +33,9 @@ async def test_broadcast_no_targets(
|
|||||||
await setup_integration()
|
await setup_integration()
|
||||||
|
|
||||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
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(
|
with patch(
|
||||||
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant"
|
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant"
|
||||||
@ -87,7 +89,9 @@ async def test_broadcast_one_target(
|
|||||||
await setup_integration()
|
await setup_integration()
|
||||||
|
|
||||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
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(
|
with patch(
|
||||||
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
|
"homeassistant.components.google_assistant_sdk.helpers.TextAssistant.assist",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user