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 2020-04-11 16:54:11 +02:00 committed by GitHub
parent c18a6d5ea3
commit b893150154
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 67 additions and 47 deletions

View file

@ -7,6 +7,7 @@ from homeassistant.const import (
POWER_WATT,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
UNIT_DEGREE,
UNIT_PERCENTAGE,
UNIT_VOLT,
)
@ -22,7 +23,7 @@ SENSORS = {
"V_RAINRATE": [None, "mdi:weather-rainy"],
"V_WIND": [None, "mdi:weather-windy"],
"V_GUST": [None, "mdi:weather-windy"],
"V_DIRECTION": ["°", "mdi:compass"],
"V_DIRECTION": [UNIT_DEGREE, "mdi:compass"],
"V_WEIGHT": [MASS_KILOGRAMS, "mdi:weight-kilogram"],
"V_DISTANCE": ["m", "mdi:ruler"],
"V_IMPEDANCE": ["ohm", None],