diff --git a/tests/components/hue/test_migration.py b/tests/components/hue/test_migration.py index b03834c3249..ef51c2a2f89 100644 --- a/tests/components/hue/test_migration.py +++ b/tests/components/hue/test_migration.py @@ -48,6 +48,7 @@ async def test_light_entity_migration( ) -> None: """Test if entity schema for lights migrates from v1 to v2.""" config_entry = mock_bridge_v2.config_entry = mock_config_entry_v2 + config_entry.add_to_hass(hass) ent_reg = er.async_get(hass) dev_reg = dr.async_get(hass) @@ -92,6 +93,7 @@ async def test_sensor_entity_migration( ) -> None: """Test if entity schema for sensors migrates from v1 to v2.""" config_entry = mock_bridge_v2.config_entry = mock_config_entry_v2 + config_entry.add_to_hass(hass) ent_reg = er.async_get(hass) dev_reg = dr.async_get(hass)