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

@@ -15,6 +15,7 @@ from homeassistant.const import (
SPEED_METERS_PER_SECOND,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
UNIT_DEGREE,
UNIT_PERCENTAGE,
)
import homeassistant.helpers.config_validation as cv
@@ -36,7 +37,7 @@ SENSOR_TYPES = {
"weather": ["Condition", None],
"temperature": ["Temperature", None],
"wind_speed": ["Wind speed", SPEED_METERS_PER_SECOND],
"wind_bearing": ["Wind bearing", "°"],
"wind_bearing": ["Wind bearing", UNIT_DEGREE],
"humidity": ["Humidity", UNIT_PERCENTAGE],
"pressure": ["Pressure", "mbar"],
"clouds": ["Cloud coverage", UNIT_PERCENTAGE],