feat: add support for T0xE6 and T0xED.

This commit is contained in:
sususweet
2025-11-22 00:31:33 +08:00
parent 55f7bdbda8
commit 00f493d06a
6 changed files with 202 additions and 5 deletions

View File

@@ -0,0 +1,70 @@
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import Platform, UnitOfElectricPotential, UnitOfTemperature, UnitOfTime, UnitOfPressure
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
DEVICE_MAPPING = {
"default": {
"rationale": ["off", "on"],
"queries": [{}],
"entities": {
Platform.SWITCH: {
"winter_mode": {
"device_class": SwitchDeviceClass.SWITCH,
},
"summer_mode": {
"device_class": SwitchDeviceClass.SWITCH,
},
"power": {
"device_class": SwitchDeviceClass.SWITCH,
},
},
Platform.SENSOR: {
"heat_exchanger": {
"device_class": SensorDeviceClass.ENUM,
},
"fan_type": {
"device_class": SensorDeviceClass.ENUM,
},
"ignitor_output": {
"device_class": SensorDeviceClass.ENUM,
},
"fan_output": {
"device_class": SensorDeviceClass.ENUM,
},
"current_heat_set_temperature": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"current_bath_set_temperature": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"heat_out_water_temperature": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"bath_out_water_temperature": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"water_gage": {
"unit_of_measurement": UnitOfPressure.PA,
"state_class": SensorStateClass.MEASUREMENT
},
},
Platform.BINARY_SENSOR: {
"heating_work": {
"device_class": BinarySensorDeviceClass.RUNNING
},
"bathing_work": {
"device_class": BinarySensorDeviceClass.RUNNING
},
},
}
}
}

View File

@@ -117,11 +117,16 @@ DEVICE_MAPPING = {
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"water_consumption_ml": {
"water_consumption": {
"device_class": SensorDeviceClass.VOLUME,
"unit_of_measurement": UnitOfVolume.LITERS,
"state_class": SensorStateClass.TOTAL_INCREASING
},
"water_consumption_ml": {
"device_class": SensorDeviceClass.VOLUME,
"unit_of_measurement": UnitOfVolume.MILLILITERS,
"state_class": SensorStateClass.TOTAL_INCREASING
},
"keep_warm_time": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.MINUTES,
@@ -246,11 +251,23 @@ DEVICE_MAPPING = {
"velocity": {
"device_class": SensorDeviceClass.ENUM,
},
"error": {
"device_class": SensorDeviceClass.ENUM,
"life_1": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
},
"category": {
"device_class": SensorDeviceClass.ENUM,
"life_2": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
},
"in_tds": {
"device_class": SensorDeviceClass.WATER,
"unit_of_measurement": "mg/L",
"state_class": SensorStateClass.MEASUREMENT
},
"out_tds": {
"device_class": SensorDeviceClass.WATER,
"unit_of_measurement": "mg/L",
"state_class": SensorStateClass.MEASUREMENT
},
}
}