Replace the usage of unit constants by enumerations in Tests [s-u] (#85937)

This commit is contained in:
Michael 2023-01-16 09:00:27 +01:00 committed by GitHub
parent 0b02abf708
commit 9709391b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 254 additions and 221 deletions

View file

@ -31,7 +31,7 @@ from homeassistant.components.weather import (
ATTR_WEATHER_WIND_SPEED_UNIT,
DOMAIN as WEATHER_DOMAIN,
)
from homeassistant.const import ATTR_ATTRIBUTION, SPEED_METERS_PER_SECOND, STATE_UNKNOWN
from homeassistant.const import ATTR_ATTRIBUTION, STATE_UNKNOWN, UnitOfSpeed
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from homeassistant.util.dt import utcnow
@ -343,7 +343,7 @@ async def test_custom_speed_unit(
entity_reg.async_update_entity_options(
state.entity_id,
WEATHER_DOMAIN,
{ATTR_WEATHER_WIND_SPEED_UNIT: SPEED_METERS_PER_SECOND},
{ATTR_WEATHER_WIND_SPEED_UNIT: UnitOfSpeed.METERS_PER_SECOND},
)
await hass.async_block_till_done()