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
|
@ -19,6 +19,7 @@ from homeassistant.const import (
|
|||
CONF_LONGITUDE,
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_NAME,
|
||||
LENGTH_KILOMETERS,
|
||||
SPEED_KILOMETERS_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
|
@ -74,7 +75,7 @@ SENSOR_TYPES = {
|
|||
"swell_dir_worded": ["Swell Direction", None],
|
||||
"swell_height": ["Swell Height", "m"],
|
||||
"swell_period": ["Swell Period", None],
|
||||
"vis_km": ["Visability km", "km"],
|
||||
"vis_km": [f"Visability {LENGTH_KILOMETERS}", LENGTH_KILOMETERS],
|
||||
"weather": ["Weather", None],
|
||||
"wind_dir": ["Wind Direction", None],
|
||||
"wind_spd_kmh": ["Wind Speed kmh", SPEED_KILOMETERS_PER_HOUR],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue