Files
midea-meiju-codec/custom_components/midea_auto_cloud/device_mapping/T0x17.py
Cyborg2017 9be4c28bdd feat: add offline voice function support for T0x17
Change-Id: Ia599072e4b9a77c360e11b5b1174bdd71d9a9c0c
2025-12-21 15:51:57 +08:00

48 lines
1.5 KiB
Python

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import Platform, UnitOfTime, UnitOfArea, UnitOfTemperature
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
DEVICE_MAPPING = {
"default": {
"rationale": ["off", "on"],
"queries": [{}],
"centralized": [],
"entities": {
Platform.SELECT:{
"updown": {
"options": {
"up": {"updown": "up"},
"down": {"updown": "down"},
"pause": {"updown": "pause"}
},
}
},
Platform.NUMBER: {
"light_brightness": {
"min": 20,
"max": 100,
"step": 1
},
"custom_height": {
"min": 0,
"max": 100,
"step": 10,
"translation_key": "laundry_height",
}
},
Platform.SWITCH: {
"light": {
"device_class": SwitchDeviceClass.SWITCH,
},
"laundry": {
"device_class": SwitchDeviceClass.SWITCH,
},
"offline_voice_function": {
"device_class": SwitchDeviceClass.SWITCH,
}
},
}
}
}