Use LENGTH_KILOMETERS constant (#33976)

* Use LENGTH_KILOMETERS constant

* Fix tests by importing the constant directly
This commit is contained in:
springstan authored and GitHub committed 2020-04-11 02:12:39 +02:00
1 parent 04c4501455
commit 328cadbaa2
21 files changed
+66 -50

No files matched your search

+2 -1
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],