Use LENGTH_KILOMETERS constant (#33976)
* Use LENGTH_KILOMETERS constant * Fix tests by importing the constant directly
This commit is contained in:
parent
04c4501455
commit
328cadbaa2
21 changed files with 66 additions and 50 deletions
|
@ -28,6 +28,7 @@ from homeassistant.const import (
|
|||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_NAME,
|
||||
IRRADIATION_WATTS_PER_SQUARE_METER,
|
||||
LENGTH_KILOMETERS,
|
||||
SPEED_KILOMETERS_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
TIME_HOURS,
|
||||
|
@ -77,7 +78,7 @@ SENSOR_TYPES = {
|
|||
"winddirection": ["Wind direction", None, "mdi:compass-outline"],
|
||||
"windazimuth": ["Wind direction azimuth", "°", "mdi:compass-outline"],
|
||||
"pressure": ["Pressure", "hPa", "mdi:gauge"],
|
||||
"visibility": ["Visibility", "km", None],
|
||||
"visibility": ["Visibility", LENGTH_KILOMETERS, None],
|
||||
"windgust": ["Wind gust", SPEED_KILOMETERS_PER_HOUR, "mdi:weather-windy"],
|
||||
"precipitation": ["Precipitation", f"mm/{TIME_HOURS}", "mdi:weather-pouring"],
|
||||
"irradiance": ["Irradiance", IRRADIATION_WATTS_PER_SQUARE_METER, "mdi:sunglasses"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue