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

@ -15,6 +15,7 @@ from homeassistant.const import (
CONF_MONITORED_CONDITIONS,
CONF_NAME,
CONF_SCAN_INTERVAL,
LENGTH_KILOMETERS,
SPEED_KILOMETERS_PER_HOUR,
SPEED_METERS_PER_SECOND,
SPEED_MILES_PER_HOUR,
@ -76,10 +77,10 @@ SENSOR_TYPES = {
],
"nearest_storm_distance": [
"Nearest Storm Distance",
"km",
LENGTH_KILOMETERS,
"mi",
"km",
"km",
LENGTH_KILOMETERS,
LENGTH_KILOMETERS,
"mi",
"mdi:weather-lightning",
["currently"],
@ -226,10 +227,10 @@ SENSOR_TYPES = {
],
"visibility": [
"Visibility",
"km",
LENGTH_KILOMETERS,
"mi",
"km",
"km",
LENGTH_KILOMETERS,
LENGTH_KILOMETERS,
"mi",
"mdi:eye",
["currently", "hourly", "daily"],