feat: add support for T0xFC. Fix #47.

This commit is contained in:
sususweet
2025-11-11 15:34:30 +08:00
parent 37ace3d764
commit cc5ec70819
9 changed files with 144 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, PERCENTAGE, DEGREE
from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, PERCENTAGE, DEGREE, \
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
@@ -94,7 +95,7 @@ DEVICE_MAPPING = {
},
"pm25": {
"device_class": SensorDeviceClass.PM25,
"unit_of_measurement": "µg/m³",
"unit_of_measurement": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
"state_class": SensorStateClass.MEASUREMENT
},
"ud_swing_angle": {