diff --git a/tests/components/trend/conftest.py b/tests/components/trend/conftest.py index cff3831658a..2555492e4fd 100644 --- a/tests/components/trend/conftest.py +++ b/tests/components/trend/conftest.py @@ -37,14 +37,17 @@ async def mock_setup_component( """Set up the trend component.""" async def _setup_func(component_params: dict[str, Any]) -> None: - config_entry.title = "test_trend_sensor" - config_entry.options = { - **config_entry.options, - **component_params, - "name": "test_trend_sensor", - "entity_id": "sensor.test_state", - } config_entry.add_to_hass(hass) + hass.config_entries.async_update_entry( + config_entry, + options={ + **config_entry.options, + **component_params, + "name": "test_trend_sensor", + "entity_id": "sensor.test_state", + }, + title="test_trend_sensor", + ) assert await hass.config_entries.async_setup(config_entry.entry_id) await hass.async_block_till_done()