Ensure entity platform in core config tests (#135729)
parent
b446eaf2d0
commit
bb505baae7
|
@ -46,7 +46,7 @@ from homeassistant.util.unit_system import (
|
||||||
UnitSystem,
|
UnitSystem,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .common import MockUser, async_capture_events
|
from .common import MockEntityPlatform, MockUser, async_capture_events
|
||||||
|
|
||||||
|
|
||||||
def test_core_config_schema() -> None:
|
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()
|
||||||
entity.entity_id = "test.test"
|
entity.entity_id = "test.test"
|
||||||
entity.hass = hass
|
entity.hass = hass
|
||||||
|
entity.platform = MockEntityPlatform(hass)
|
||||||
entity.schedule_update_ha_state()
|
entity.schedule_update_ha_state()
|
||||||
|
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
Loading…
Reference in New Issue