Replace the usage of unit constants by enumerations in Tests [s-u] (#85937)
This commit is contained in:
parent
0b02abf708
commit
9709391b52
15 changed files with 254 additions and 221 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue