From cc13d7eec736f9db218cbdc4e376835b581c5ba6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 12 Feb 2024 13:20:10 -0600 Subject: [PATCH] Migrate hue to use async_update_entry to alter config entries (#110310) --- tests/components/hue/test_light_v1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/components/hue/test_light_v1.py b/tests/components/hue/test_light_v1.py index 90f8b0adfbf..da11068a34f 100644 --- a/tests/components/hue/test_light_v1.py +++ b/tests/components/hue/test_light_v1.py @@ -174,13 +174,15 @@ LIGHT_GAMUT = color.GamutType( LIGHT_GAMUT_TYPE = "A" -async def setup_bridge(hass, mock_bridge_v1): +async def setup_bridge(hass: HomeAssistant, mock_bridge_v1): """Load the Hue light platform with the provided bridge.""" hass.config.components.add(hue.DOMAIN) config_entry = create_config_entry() + hass.config_entries.async_update_entry( + config_entry, options={CONF_ALLOW_HUE_GROUPS: True} + ) config_entry.add_to_hass(hass) config_entry.mock_state(hass, ConfigEntryState.LOADED) - config_entry.options = {CONF_ALLOW_HUE_GROUPS: True} mock_bridge_v1.config_entry = config_entry hass.data[hue.DOMAIN] = {config_entry.entry_id: mock_bridge_v1} await hass.config_entries.async_forward_entry_setup(config_entry, "light")