diff --git a/custom_components/midea_auto_cloud/device_mapping/T0x17.py b/custom_components/midea_auto_cloud/device_mapping/T0x17.py index 3d1699d..6514ff3 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0x17.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0x17.py @@ -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: { diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 5b30223..44335c9 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -2052,6 +2052,9 @@ } }, "number": { + "custom_timing": { + "name": "Light Off Timer" + }, "keep_warm_time": { "name": "Keep Warm Time" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index 47afb05..8f778fc 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -2185,6 +2185,9 @@ } }, "number": { + "custom_timing": { + "name": "延时关灯" + }, "keep_warm_time": { "name": "保温时间" },