Adjust units in lcn (#84051)

* Use unit enumerators in lcn

* Don't mix lcn units with home assistant units
This commit is contained in:
epenet 2022-12-19 13:24:25 +01:00 committed by GitHub
parent b4274e4a26
commit 1ab6352a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,7 @@
"""Constants for the LCN component."""
from itertools import product
from homeassistant.const import (
DEGREE,
ELECTRIC_POTENTIAL_VOLT,
PERCENTAGE,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
TEMP_KELVIN,
Platform,
)
from homeassistant.const import Platform
PLATFORMS = [
Platform.BINARY_SENSOR,
@ -166,9 +158,9 @@ VAR_UNITS = [
"",
"LCN",
"NATIVE",
TEMP_CELSIUS,
TEMP_KELVIN,
TEMP_FAHRENHEIT,
"°C",
"K",
"°F",
"LUX_T",
"LX_T",
"LUX_I",
@ -176,16 +168,16 @@ VAR_UNITS = [
"LX",
"M/S",
"METERPERSECOND",
PERCENTAGE,
"%",
"PERCENT",
"PPM",
"VOLT",
ELECTRIC_POTENTIAL_VOLT,
"V",
"AMPERE",
"AMP",
"A",
"DEGREE",
DEGREE,
"°",
]
RELVARREF = ["CURRENT", "PROG"]