Use LENGTH_KILOMETERS constant (#33976)

* Use LENGTH_KILOMETERS constant

* Fix tests by importing the constant directly
This commit is contained in:
springstan 2020-04-11 02:12:39 +02:00 committed by GitHub
parent 04c4501455
commit 328cadbaa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 66 additions and 50 deletions

View file

@ -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],