diff --git a/custom_components/midea_auto_cloud/device_mapping/T0x13.py b/custom_components/midea_auto_cloud/device_mapping/T0x13.py index 668cc93..c152959 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0x13.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0x13.py @@ -1,5 +1,5 @@ from homeassistant.components.fan import DIRECTION_FORWARD, DIRECTION_REVERSE -from homeassistant.const import Platform, UnitOfTemperature, PRECISION_WHOLE +from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, PRECISION_WHOLE DEVICE_MAPPING = { "default": { @@ -141,5 +141,40 @@ DEVICE_MAPPING = { } } } + }, + "22222222": { + "rationale": ["off", "on"], + "queries": [{}], + "centralized": [], + "entities": { + Platform.LIGHT: { + "light": { + "power": "power", + "brightness": {"brightness": [0, 255]}, + "color_temp": { + "color_temperature": { + "kelvin_range": [2700, 6500], + "device_range": [0, 255] + } + }, + "preset_modes": { + "night": {"scene_light": "night"}, + "read": {"scene_light": "read"}, + "mild": {"scene_light": "mild"}, + "life": {"scene_light": "life"}, + "film": {"scene_light": "film"}, + "manual": {"scene_light": "manual"}, + } + } + }, + Platform.NUMBER: { + "delay_light_off": { + "min": 0, + "max": 60, + "step": 1, + "unit_of_measurement": UnitOfTime.MINUTES + } + } + } } } diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 68279d3..a9e12aa 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -2203,6 +2203,9 @@ } }, "number": { + "delay_light_off": { + "name": "Delay Light Off" + }, "hosting_upper": { "name": "PM2.5 Upper(Auto Purification)" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index 02ba235..8a99a77 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -2493,10 +2493,25 @@ }, "light": { "light": { - "name": "电灯" + "name": "电灯", + "state_attributes": { + "effect": { + "state": { + "night": "夜灯", + "read": "阅读", + "mild": "柔和", + "life": "生活", + "film": "影院", + "manual": "自定义" + } + } + } } }, "number": { + "delay_light_off": { + "name": "延时关灯" + }, "hosting_upper": { "name": "PM2.5上阈值(自动净化)" },