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

@ -4,6 +4,8 @@ from itertools import product
from homeassistant.const import (
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
TEMP_KELVIN,
UNIT_DEGREE,
UNIT_PERCENTAGE,
UNIT_VOLT,
)
@ -149,7 +151,7 @@ VAR_UNITS = [
"LCN",
"NATIVE",
TEMP_CELSIUS,
"°K",
TEMP_KELVIN,
TEMP_FAHRENHEIT,
"LUX_T",
"LX_T",
@ -167,7 +169,7 @@ VAR_UNITS = [
"AMP",
"A",
"DEGREE",
"°",
UNIT_DEGREE,
]
RELVARREF = ["CURRENT", "PROG"]