Use registry fixtures in tests (v-y) (#118299)

This commit is contained in:
epenet 2024-05-28 14:26:14 +02:00 committed by GitHub
parent 8d8696075b
commit f07f183a3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 108 additions and 92 deletions

View file

@ -413,7 +413,9 @@ async def test_humidity(
assert float(state.attributes[ATTR_WEATHER_HUMIDITY]) == 80
async def test_custom_units(hass: HomeAssistant, config_flow_fixture: None) -> None:
async def test_custom_units(
hass: HomeAssistant, entity_registry: er.EntityRegistry, config_flow_fixture: None
) -> None:
"""Test custom unit."""
wind_speed_value = 5
wind_speed_unit = UnitOfSpeed.METERS_PER_SECOND
@ -434,8 +436,6 @@ async def test_custom_units(hass: HomeAssistant, config_flow_fixture: None) -> N
"visibility_unit": UnitOfLength.MILES,
}
entity_registry = er.async_get(hass)
entry = entity_registry.async_get_or_create("weather", "test", "very_unique")
entity_registry.async_update_entity_options(entry.entity_id, "weather", set_options)
await hass.async_block_till_done()