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, PRECISION_HALVES
from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, PERCENTAGE, PRECISION_HALVES, \
CONCENTRATION_PARTS_PER_MILLION
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
@@ -155,7 +156,7 @@ DEVICE_MAPPING = {
},
"tds_value": {
"device_class": SensorDeviceClass.WATER,
"unit_of_measurement": "ppm",
"unit_of_measurement": CONCENTRATION_PARTS_PER_MILLION,
"state_class": SensorStateClass.MEASUREMENT
},
"heat_water_level": {