Update f-g* tests to use entity & device registry fixtures (#103841)

This commit is contained in:
Jan-Philipp Benecke 2023-11-12 13:07:38 +01:00 committed by GitHub
parent b9bc6ca070
commit 04a497343d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 317 additions and 270 deletions

View file

@ -64,6 +64,7 @@ PRODUCT_VALUE = prod(VALUES)
)
async def test_sensors(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
sensor_type: str,
result: str,
attributes: dict[str, Any],
@ -107,8 +108,7 @@ async def test_sensors(
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "L"
entity_reg = er.async_get(hass)
entity = entity_reg.async_get(f"sensor.sensor_group_{sensor_type}")
entity = entity_registry.async_get(f"sensor.sensor_group_{sensor_type}")
assert entity.unique_id == "very_unique_id"