From 1ab6352a87840074ebb7e4c8b52caf5b92891901 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:24:25 +0100 Subject: [PATCH] Adjust units in lcn (#84051) * Use unit enumerators in lcn * Don't mix lcn units with home assistant units --- homeassistant/components/lcn/const.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/homeassistant/components/lcn/const.py b/homeassistant/components/lcn/const.py index ef0ad6481f4..bb97658b880 100644 --- a/homeassistant/components/lcn/const.py +++ b/homeassistant/components/lcn/const.py @@ -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"]