Ensure entity platform in core config tests (#135729)

pull/135799/head^2
G Johansson 2025-01-16 23:06:20 +01:00 committed by GitHub
parent b446eaf2d0
commit bb505baae7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

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