Add and use UNIT_DEGREE constant (#33978)

* Add and use UNIT_DEGREE constant

* Replace more occurrences

* Add and use TEMP_KELVIN

* Run isort
This commit is contained in:
springstan authored and GitHub committed 2020-04-11 16:54:11 +02:00
1 parent c18a6d5ea3
commit b893150154
19 files changed
+67 -47

No files matched your search

+11 -10
View File
@@ -22,6 +22,7 @@ from homeassistant.const import (
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
TIME_HOURS,
UNIT_DEGREE,
UNIT_PERCENTAGE,
UNIT_UV_INDEX,
)
@@ -87,11 +88,11 @@ SENSOR_TYPES = {
],
"nearest_storm_bearing": [
"Nearest Storm Bearing",
"°",
"°",
"°",
"°",
"°",
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
"mdi:weather-lightning",
["currently"],
],
@@ -177,11 +178,11 @@ SENSOR_TYPES = {
],
"wind_bearing": [
"Wind Bearing",
"°",
"°",
"°",
"°",
"°",
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
UNIT_DEGREE,
"mdi:compass",
["currently", "hourly", "daily"],
],