mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Adjust units in lcn (#84051)
* Use unit enumerators in lcn * Don't mix lcn units with home assistant units
This commit is contained in:
parent
b4274e4a26
commit
1ab6352a87
@ -1,15 +1,7 @@
|
|||||||
"""Constants for the LCN component."""
|
"""Constants for the LCN component."""
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import Platform
|
||||||
DEGREE,
|
|
||||||
ELECTRIC_POTENTIAL_VOLT,
|
|
||||||
PERCENTAGE,
|
|
||||||
TEMP_CELSIUS,
|
|
||||||
TEMP_FAHRENHEIT,
|
|
||||||
TEMP_KELVIN,
|
|
||||||
Platform,
|
|
||||||
)
|
|
||||||
|
|
||||||
PLATFORMS = [
|
PLATFORMS = [
|
||||||
Platform.BINARY_SENSOR,
|
Platform.BINARY_SENSOR,
|
||||||
@ -166,9 +158,9 @@ VAR_UNITS = [
|
|||||||
"",
|
"",
|
||||||
"LCN",
|
"LCN",
|
||||||
"NATIVE",
|
"NATIVE",
|
||||||
TEMP_CELSIUS,
|
"°C",
|
||||||
TEMP_KELVIN,
|
"K",
|
||||||
TEMP_FAHRENHEIT,
|
"°F",
|
||||||
"LUX_T",
|
"LUX_T",
|
||||||
"LX_T",
|
"LX_T",
|
||||||
"LUX_I",
|
"LUX_I",
|
||||||
@ -176,16 +168,16 @@ VAR_UNITS = [
|
|||||||
"LX",
|
"LX",
|
||||||
"M/S",
|
"M/S",
|
||||||
"METERPERSECOND",
|
"METERPERSECOND",
|
||||||
PERCENTAGE,
|
"%",
|
||||||
"PERCENT",
|
"PERCENT",
|
||||||
"PPM",
|
"PPM",
|
||||||
"VOLT",
|
"VOLT",
|
||||||
ELECTRIC_POTENTIAL_VOLT,
|
"V",
|
||||||
"AMPERE",
|
"AMPERE",
|
||||||
"AMP",
|
"AMP",
|
||||||
"A",
|
"A",
|
||||||
"DEGREE",
|
"DEGREE",
|
||||||
DEGREE,
|
"°",
|
||||||
]
|
]
|
||||||
|
|
||||||
RELVARREF = ["CURRENT", "PROG"]
|
RELVARREF = ["CURRENT", "PROG"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user