Update m* tests to use entity & device registry fixtures (#103980)
This commit is contained in:
parent
51c1ea85f3
commit
9326ea09a5
46 changed files with 361 additions and 298 deletions
|
@ -60,9 +60,10 @@ WALL_ENTITY_ID = "climate.testroom_testwallthermostat"
|
|||
VALVE_POSITION = "valve_position"
|
||||
|
||||
|
||||
async def test_setup_thermostat(hass: HomeAssistant, cube: MaxCube) -> None:
|
||||
async def test_setup_thermostat(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, cube: MaxCube
|
||||
) -> None:
|
||||
"""Test a successful setup of a thermostat device."""
|
||||
entity_registry = er.async_get(hass)
|
||||
assert entity_registry.async_is_registered(ENTITY_ID)
|
||||
entity = entity_registry.async_get(ENTITY_ID)
|
||||
assert entity.unique_id == "AABBCCDD01"
|
||||
|
@ -96,9 +97,10 @@ async def test_setup_thermostat(hass: HomeAssistant, cube: MaxCube) -> None:
|
|||
assert state.attributes.get(VALVE_POSITION) == 25
|
||||
|
||||
|
||||
async def test_setup_wallthermostat(hass: HomeAssistant, cube: MaxCube) -> None:
|
||||
async def test_setup_wallthermostat(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, cube: MaxCube
|
||||
) -> None:
|
||||
"""Test a successful setup of a wall thermostat device."""
|
||||
entity_registry = er.async_get(hass)
|
||||
assert entity_registry.async_is_registered(WALL_ENTITY_ID)
|
||||
entity = entity_registry.async_get(WALL_ENTITY_ID)
|
||||
assert entity.unique_id == "AABBCCDD02"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue