fix: support of custom_timing for T0x17

This commit is contained in:
Cyborg2017
2026-01-05 20:49:55 +08:00
parent c55fc36119
commit c91898621f
3 changed files with 15 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import Platform, UnitOfTime, UnitOfArea, UnitOfTemperature
from homeassistant.const import Platform, PERCENTAGE, UnitOfTime, UnitOfArea, UnitOfTemperature
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
@@ -22,13 +22,20 @@ DEVICE_MAPPING = {
"light_brightness": {
"min": 20,
"max": 100,
"step": 1
"step": 1,
"unit_of_measurement": PERCENTAGE
},
"custom_height": {
"min": 0,
"max": 100,
"step": 10,
"translation_key": "laundry_height",
},
"custom_timing": {
"min": 0,
"max": 180,
"step": 5,
"unit_of_measurement": UnitOfTime.MINUTES
}
},
Platform.SWITCH: {

View File

@@ -2052,6 +2052,9 @@
}
},
"number": {
"custom_timing": {
"name": "Light Off Timer"
},
"keep_warm_time": {
"name": "Keep Warm Time"
},

View File

@@ -2185,6 +2185,9 @@
}
},
"number": {
"custom_timing": {
"name": "延时关灯"
},
"keep_warm_time": {
"name": "保温时间"
},