diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xFB.py b/custom_components/midea_auto_cloud/device_mapping/T0xFB.py index 09462d8..14ffc37 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xFB.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xFB.py @@ -84,6 +84,11 @@ DEVICE_MAPPING = { "off": {"power": "off"}, "heat": {"power": "on"} }, + "preset_modes": { + "left_warm": {"gear": 1}, + "right_warm": {"gear": 2}, + "full_on": {"gear": 3} + }, "target_temperature": "temperature", "current_temperature": "cur_temperature", "min_temp": 5, @@ -92,20 +97,16 @@ DEVICE_MAPPING = { "precision": PRECISION_WHOLE, } }, - Platform.SELECT: { - "gear": { - "options": { - "left_warm": {"gear": 1}, - "right_warm": {"gear": 2}, - "full_on": {"gear": 3} - } - } - }, Platform.SENSOR: { "power_statistics": { "device_class": SensorDeviceClass.POWER, "unit_of_measurement": UnitOfPower.WATT, "state_class": SensorStateClass.MEASUREMENT + }, + "cur_temperature": { + "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 522dd32..4c3d41f 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -396,7 +396,16 @@ "name": "Water Heater" }, "electric_heater": { - "name": "Electric Heater" + "name": "Electric Heater", + "state_attributes": { + "preset_mode": { + "state": { + "left_warm": "Left Warm", + "right_warm": "Right Warm", + "full_on": "Full On" + } + } + } }, "heating": { "name": "Heating" @@ -868,10 +877,7 @@ "state": { "low": "Low", "medium": "Medium", - "high": "High", - "left_warm": "Left Warm", - "right_warm": "Right Warm", - "full_on": "Full On" + "high": "High" } }, "ptc": { diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index d37cbd6..283e04d 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -396,7 +396,16 @@ "name": "热水器" }, "electric_heater": { - "name": "取暖器" + "name": "取暖器", + "state_attributes": { + "preset_mode": { + "state": { + "left_warm": "左暖", + "right_warm": "右暖", + "full_on": "全开" + } + } + } }, "heating": { "name": "采暖" @@ -983,10 +992,7 @@ "state": { "low": "低", "medium": "中", - "high": "高", - "left_warm": "左暖", - "right_warm": "右暖", - "full_on": "全开" + "high": "高" } }, "ptc": {