diff --git a/README.md b/README.md index e93c6e1..8d0b4d9 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th - T0x13 Electric Light - T0x21 Central Air Conditioning Gateway - T0x26 Bath Heater +- T0x3D Water Heater - T0xA1 Dehumidifier - T0xAC Air Conditioner - T0xB2 Electric Steamer diff --git a/README_zh_CN.md b/README_zh_CN.md index 7163f82..8b397c2 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -20,7 +20,8 @@ - T0x13 电灯 - T0x21 中央空调网关 -- T0x26 浴霸 +- T0x26 浴霸 +- T0x3D 电热水瓶 - T0xA1 除湿机 - T0xAC 空调 - T0xB2 电蒸箱 diff --git a/custom_components/midea_auto_cloud/device_mapping/T0x3D.py b/custom_components/midea_auto_cloud/device_mapping/T0x3D.py new file mode 100644 index 0000000..edf9485 --- /dev/null +++ b/custom_components/midea_auto_cloud/device_mapping/T0x3D.py @@ -0,0 +1,48 @@ +from homeassistant.const import Platform, UnitOfTemperature, UnitOfVolume, UnitOfTime, PERCENTAGE, PRECISION_HALVES, \ + UnitOfEnergy, UnitOfPower, PRECISION_WHOLE +from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass +from homeassistant.components.binary_sensor import BinarySensorDeviceClass +from homeassistant.components.switch import SwitchDeviceClass + +DEVICE_MAPPING = { + "default": { + "rationale": ["off", "on"], + "queries": [{}], + "centralized": [], + "entities": { + Platform.SWITCH: { + "work_switch": { + "device_class": SwitchDeviceClass.SWITCH, + "rationale": ['cancel', 'work'] + } + }, + Platform.SELECT: { + "warm_target_temp": { + "options": { + "45℃": {"warm_target_temp": "45"}, + "55℃": {"warm_target_temp": "55"}, + "65℃": {"warm_target_temp": "65"}, + "75℃": {"warm_target_temp": "75"}, + "85℃": {"warm_target_temp": "85"} + } + }, + "boil_target_temp": { + "options": { + "45℃": {"boil_target_temp": "45"}, + "55℃": {"boil_target_temp": "55"}, + "65℃": {"boil_target_temp": "65"}, + "75℃": {"boil_target_temp": "75"}, + "85℃": {"boil_target_temp": "85"} + } + } + }, + Platform.SENSOR: { + "cur_temp": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT + } + } + } + } +} diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 8ce1760..a622773 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -373,6 +373,12 @@ } }, "select": { + "warm_target_temp": { + "name": "Warm Target Temperature" + }, + "boil_target_temp": { + "name": "Boil Target Temperature" + }, "add_rinse": { "name": "Add Rinse" }, @@ -2387,6 +2393,33 @@ }, "is_lock_rc": { "name": "Remote Control Lock" + }, + "endpoint_1_onoff": { + "name": "Button 1" + }, + "endpoint_2_onoff": { + "name": "Button 2" + }, + "endpoint_3_onoff": { + "name": "Button 3" + }, + "endpoint_4_onoff": { + "name": "Button 4" + }, + "endpoint_5_onoff": { + "name": "Button 5" + }, + "endpoint_6_onoff": { + "name": "Button 6" + }, + "endpoint_7_onoff": { + "name": "Button 7" + }, + "endpoint_8_onoff": { + "name": "Button 8" + }, + "work_switch": { + "name": "Work Switch" } } } diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index a5eddab..ec11c1d 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -377,6 +377,12 @@ } }, "select": { + "warm_target_temp": { + "name": "保温目标温度" + }, + "boil_target_temp": { + "name": "煮沸目标温度" + }, "add_rinse": { "name": "加漂洗" }, @@ -2391,6 +2397,33 @@ }, "is_lock_rc": { "name": "遥控锁定" + }, + "endpoint_1_onoff": { + "name": "按键一" + }, + "endpoint_2_onoff": { + "name": "按键二" + }, + "endpoint_3_onoff": { + "name": "按键三" + }, + "endpoint_4_onoff": { + "name": "按键四" + }, + "endpoint_5_onoff": { + "name": "按键五" + }, + "endpoint_6_onoff": { + "name": "按键六" + }, + "endpoint_7_onoff": { + "name": "按键七" + }, + "endpoint_8_onoff": { + "name": "按键八" + }, + "work_switch": { + "name": "工作开关" } } }