feat: add device support for T0x21 switch.

This commit is contained in:
sususweet
2025-10-27 22:38:12 +08:00
parent 087c5db497
commit 171d76ee3e
4 changed files with 196 additions and 13 deletions

View File

@@ -3,7 +3,24 @@ from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
DEVICE_MAPPING = {
"default": {
"00000000": {
"rationale": ["0", "1"],
"queries": [{}],
"centralized": [],
"entities": {
Platform.SWITCH: {
"endpoint_1_OnOff": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['0', '1']
},
"endpoint_2_OnOff": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['0', '1']
}
},
}
},
"b17-0000": {
"rationale": ["off", "on"],
"queries": [{}],
"centralized": ["run_mode", "fan_speed", "cooling_temp", "heating_temp", "extflag"],