feat: update device mapping for T0xED. Fix #85

This commit is contained in:
sususweet
2026-01-07 00:03:56 +08:00
parent 4a9183f486
commit c55fc36119
3 changed files with 59 additions and 66 deletions

View File

@@ -8,8 +8,37 @@ DEVICE_MAPPING = {
"default": {
"rationale": ["off", "on"],
"queries": [{}],
"centralized": [],
"centralized": ["custom_temperature_1"],
"entities": {
Platform.SELECT: {
"heat_start": {
"options": {
"start": {"heat_start": 1},
"stop": {"heat_start": 0}
},
}
},
Platform.NUMBER: {
"custom_temperature_1": {
"min": 87,
"max": 100,
"step": 1,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"translation_key": "target_temperature",
"command": {
"heat_start": 1,
}
},
"keep_warm_time": {
"min": 1,
"max": 24,
"step": 1,
"unit_of_measurement": UnitOfTime.HOURS,
"command": {
"keep_warm": "on",
}
},
},
Platform.SWITCH: {
"power": {
"device_class": SwitchDeviceClass.SWITCH,
@@ -17,6 +46,9 @@ DEVICE_MAPPING = {
"heat": {
"device_class": SwitchDeviceClass.SWITCH,
},
"cool": {
"device_class": SwitchDeviceClass.SWITCH,
},
"lock": {
"device_class": SwitchDeviceClass.SWITCH,
},
@@ -147,31 +179,6 @@ DEVICE_MAPPING = {
"unit_of_measurement": "%",
"state_class": SensorStateClass.MEASUREMENT
},
"salt_setting": {
"device_class": SensorDeviceClass.WEIGHT,
"unit_of_measurement": UnitOfMass.KILOGRAMS,
"state_class": SensorStateClass.MEASUREMENT
},
"supply_voltage": {
"device_class": SensorDeviceClass.VOLTAGE,
"unit_of_measurement": UnitOfElectricPotential.VOLT,
"state_class": SensorStateClass.MEASUREMENT
},
"battery_voltage": {
"device_class": SensorDeviceClass.VOLTAGE,
"unit_of_measurement": UnitOfElectricPotential.VOLT,
"state_class": SensorStateClass.MEASUREMENT
},
"water_hardness": {
"device_class": SensorDeviceClass.WATER,
"unit_of_measurement": "mg/L",
"state_class": SensorStateClass.MEASUREMENT
},
"water_consumption_big": {
"device_class": SensorDeviceClass.VOLUME,
"unit_of_measurement": UnitOfVolume.LITERS,
"state_class": SensorStateClass.TOTAL_INCREASING
},
"water_consumption_today": {
"device_class": SensorDeviceClass.VOLUME,
"unit_of_measurement": UnitOfVolume.LITERS,
@@ -182,38 +189,9 @@ DEVICE_MAPPING = {
"unit_of_measurement": UnitOfVolume.LITERS,
"state_class": SensorStateClass.TOTAL_INCREASING
},
"soft_available_big": {
"device_class": SensorDeviceClass.VOLUME,
"unit_of_measurement": UnitOfVolume.LITERS,
"state_class": SensorStateClass.MEASUREMENT
},
"regeneration_left_seconds": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.SECONDS,
"state_class": SensorStateClass.MEASUREMENT
},
"heat_start": {
"device_class": SensorDeviceClass.ENUM,
},
"regeneration_stages": {
"device_class": SensorDeviceClass.ENUM,
},
"regeneration_current_stages": {
"device_class": SensorDeviceClass.ENUM,
},
"regeneration_count": {
"device_class": SensorDeviceClass.ENUM,
},
"days_since_last_regeneration": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
"state_class": SensorStateClass.MEASUREMENT
},
"days_since_last_two_regeneration": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
"state_class": SensorStateClass.MEASUREMENT
},
"use_days": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
@@ -234,20 +212,9 @@ DEVICE_MAPPING = {
"unit_of_measurement": UnitOfTime.DAYS,
"state_class": SensorStateClass.MEASUREMENT
},
"maintenance_reminder_setting": {
"device_class": SensorDeviceClass.DURATION,
"unit_of_measurement": UnitOfTime.DAYS,
"state_class": SensorStateClass.MEASUREMENT
},
"micro_leak_protection_value": {
"device_class": SensorDeviceClass.ENUM,
},
"leak_water_protection_value": {
"device_class": SensorDeviceClass.ENUM,
},
"mixed_water_gear": {
"device_class": SensorDeviceClass.ENUM,
},
"velocity": {
"device_class": SensorDeviceClass.ENUM,
},

View File

@@ -411,6 +411,13 @@
}
},
"select": {
"heat_start": {
"name": "Boil Water",
"state": {
"start": "Start",
"stop": "Stop"
}
},
"new_wind_model_intake_enable": {
"name": "Intake Wind",
"state": {
@@ -2045,6 +2052,12 @@
}
},
"number": {
"keep_warm_time": {
"name": "Keep Warm Time"
},
"target_temperature": {
"name": "Target Temperature"
},
"light_brightness": {
"name": "Light Brightness"
},

View File

@@ -411,6 +411,13 @@
}
},
"select": {
"heat_start": {
"name": "烧水",
"state": {
"start": "开始",
"stop": "停止"
}
},
"new_wind_model_intake_enable": {
"name": "新风",
"state": {
@@ -2178,6 +2185,12 @@
}
},
"number": {
"keep_warm_time": {
"name": "保温时间"
},
"target_temperature": {
"name": "目标温度"
},
"bath_temperature": {
"name": "沐浴温度"
},