Migrate google_assistant_sdk to use async_update_entry to alter config entries (#110307)

pull/110344/head
J. Nick Koston 2024-02-12 04:16:44 -06:00 committed by GitHub
parent 8376c07969
commit b5d9f275b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -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(

View File

@ -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",