feat: add device mapping for T0xFB(570667EC)

* Device type: T0xFB, Sn8: 570667EC, model: HDU20WS.
This commit is contained in:
Cyborg2017
2025-12-26 20:58:41 +08:00
parent 9fdf12cbd4
commit ed4e3d34fe
3 changed files with 84 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
from homeassistant.const import Platform, UnitOfTemperature, UnitOfVolume, UnitOfTime, PERCENTAGE, PRECISION_HALVES, \
UnitOfEnergy, UnitOfPower
PRECISION_WHOLE, UnitOfEnergy, UnitOfPower
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
@@ -50,5 +50,64 @@ DEVICE_MAPPING = {
}
}
}
},
"570667EC": {
"rationale": ["off", "on"],
"queries": [{}],
"centralized": [],
"entities": {
Platform.SWITCH: {
"auto_power_off": {
"device_class": SwitchDeviceClass.SWITCH,
},
"humidification": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['off', 'no_change'],
},
"lock": {
"device_class": SwitchDeviceClass.SWITCH,
"translation_key": "child_lock",
},
"screen_close": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['on', 'off'],
},
"voice": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['close_buzzer', 'open_buzzer'],
}
},
Platform.CLIMATE: {
"electric_heater": {
"power": "power",
"hvac_modes": {
"off": {"power": "off"},
"heat": {"power": "on"}
},
"target_temperature": "temperature",
"current_temperature": "cur_temperature",
"min_temp": 5,
"max_temp": 35,
"temperature_unit": UnitOfTemperature.CELSIUS,
"precision": PRECISION_WHOLE,
}
},
Platform.SELECT: {
"gear": {
"options": {
"left_warm": {"gear": 1},
"right_warm": {"gear": 2},
"full_on": {"gear": 3}
}
}
},
Platform.SENSOR: {
"power_statistics": {
"device_class": SensorDeviceClass.POWER,
"unit_of_measurement": UnitOfPower.WATT,
"state_class": SensorStateClass.MEASUREMENT
}
}
}
}
}

View File

@@ -828,7 +828,12 @@
"name": "Sleep Sensor"
},
"gear": {
"name": "Gear"
"name": "Gear",
"state": {
"left_warm": "Left Warm",
"right_warm": "Right Warm",
"full_on": "Full On"
}
},
"ptc": {
"name": "PTC"
@@ -1998,6 +2003,12 @@
}
},
"switch": {
"auto_power_off": {
"name": "Auto Power Off"
},
"voice": {
"name": "Sound"
},
"laundry": {
"name": "One Key Laundry"
},

View File

@@ -928,7 +928,12 @@
"name": "睡眠传感器"
},
"gear": {
"name": "档位"
"name": "档位",
"state": {
"left_warm": "左暖",
"right_warm": "右暖",
"full_on": "全开"
}
},
"ptc": {
"name": "电辅热"
@@ -2098,6 +2103,12 @@
}
},
"switch": {
"auto_power_off": {
"name": "待机超时自动关机"
},
"voice": {
"name": "声音"
},
"laundry": {
"name": "一键晾衣"
},