From bb505baae7ddc919a1c68158fe803c69de0ce9af Mon Sep 17 00:00:00 2001 From: G Johansson Date: Thu, 16 Jan 2025 23:06:20 +0100 Subject: [PATCH] Ensure entity platform in core config tests (#135729) --- tests/test_core_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_core_config.py b/tests/test_core_config.py index 6c7e188df6d..2723c8e7196 100644 --- a/tests/test_core_config.py +++ b/tests/test_core_config.py @@ -46,7 +46,7 @@ from homeassistant.util.unit_system import ( UnitSystem, ) -from .common import MockUser, async_capture_events +from .common import MockEntityPlatform, MockUser, async_capture_events def test_core_config_schema() -> None: @@ -222,6 +222,7 @@ async def _compute_state(hass: HomeAssistant, config: dict[str, Any]) -> State | entity = Entity() entity.entity_id = "test.test" entity.hass = hass + entity.platform = MockEntityPlatform(hass) entity.schedule_update_ha_state() await hass.async_block_till_done()