Skip to content

Commit 4215a16

Browse files
authored
Add SensorDeviceClass and unit for LCN humidity sensor. (#155044)
1 parent 65ff4fe commit 4215a16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

homeassistant/components/lcn/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
CONF_SOURCE,
1919
CONF_UNIT_OF_MEASUREMENT,
2020
LIGHT_LUX,
21+
PERCENTAGE,
2122
UnitOfElectricCurrent,
2223
UnitOfElectricPotential,
2324
UnitOfSpeed,
@@ -50,6 +51,7 @@
5051
pypck.lcn_defs.VarUnit.VOLT: SensorDeviceClass.VOLTAGE,
5152
pypck.lcn_defs.VarUnit.AMPERE: SensorDeviceClass.CURRENT,
5253
pypck.lcn_defs.VarUnit.PPM: SensorDeviceClass.CO2,
54+
pypck.lcn_defs.VarUnit.PERCENT: SensorDeviceClass.HUMIDITY,
5355
}
5456

5557
UNIT_OF_MEASUREMENT_MAPPING = {
@@ -62,6 +64,7 @@
6264
pypck.lcn_defs.VarUnit.VOLT: UnitOfElectricPotential.VOLT,
6365
pypck.lcn_defs.VarUnit.AMPERE: UnitOfElectricCurrent.AMPERE,
6466
pypck.lcn_defs.VarUnit.PPM: CONCENTRATION_PARTS_PER_MILLION,
67+
pypck.lcn_defs.VarUnit.PERCENT: PERCENTAGE,
6568
}
6669

6770

0 commit comments

Comments
 (0)