feat: add support for colmo ground warmer, sn 17497071. Fix #54.

This commit is contained in:
sususweet
2025-11-27 11:12:50 +08:00
parent e5bbcfca94
commit 7fac466875
4 changed files with 118 additions and 7 deletions

View File

@@ -108,6 +108,16 @@ class MideaClimateEntity(MideaEntity, ClimateEntity):
@property
def current_temperature(self):
if isinstance(self._key_current_temperature, list):
temp_int = self._get_nested_value(self._key_current_temperature[0])
tem_dec = self._get_nested_value(self._key_current_temperature[1])
if temp_int is not None and tem_dec is not None:
try:
return float(temp_int) + float(tem_dec)
except (ValueError, TypeError):
return None
return None
else:
temp = self._get_nested_value(self._key_current_temperature)
if temp is not None:
try:

View File

@@ -130,6 +130,69 @@ DEVICE_MAPPING = {
}
}
},
"17497071": {
"rationale": ["off", "on"],
"queries": [{}, {"query_type": "water_model_run_status"}],
"centralized": [],
"entities": {
Platform.CLIMATE: {
"thermostat": {
"power": "water_model_power",
"hvac_modes": {
"off": {"water_model_power": "off"},
"heat": {"water_model_power": "on"},
},
"preset_modes": {
"auto": {"water_model_temperature_auto": "on", "water_temp_linkage_switch": 0},
"link": {"water_model_temperature_auto": "off", "water_temp_linkage_switch": 1},
"manual": {"water_model_temperature_auto": "off", "water_temp_linkage_switch": 0}
},
"target_temperature": "water_model_temperature_set",
"current_temperature": ["temperature", "small_temperature"],
"pre_mode": "mode",
"aux_heat": "water_model_ptc",
"min_temp": 25,
"max_temp": 60,
"temperature_unit": UnitOfTemperature.CELSIUS,
"precision": PRECISION_HALVES,
}
},
Platform.SWITCH: {
"water_model_power_save": {
"device_class": SwitchDeviceClass.SWITCH,
},
"water_model_go_out": {
"device_class": SwitchDeviceClass.SWITCH,
},
"water_model_ptc": {
"device_class": SwitchDeviceClass.SWITCH,
"translation_key": "aux_heat",
},
},
Platform.SENSOR: {
"tw1_in_water_temp": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"tw1_out_water_temp": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"temperature": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
"humidity": {
"device_class": SensorDeviceClass.HUMIDITY,
"unit_of_measurement": "%",
"state_class": SensorStateClass.MEASUREMENT
}
}
}
},
"22259015": {
"rationale": ["off", "on"],
"queries": [{}, {"query_type": "run_status"}, {"query_type": "module_30"}, {"query_type": "module_31"}, {"query_type": "module_32"}],

View File

@@ -320,6 +320,13 @@
"thermostat": {
"name": "Thermostat",
"state_attributes": {
"preset_modes": {
"state": {
"auto": "auto",
"link": "link",
"manual": "manual"
}
},
"fan_mode": {
"state": {
"silent": "Silent",
@@ -1565,6 +1572,12 @@
},
"heat_temp_set": {
"name": "Heat Temperature Set"
},
"tw1_in_water_temp": {
"name": "Inlet Water Temperature"
},
"tw1_out_water_temp": {
"name": "Outlet Water Temperature"
}
},
"light": {
@@ -2530,6 +2543,12 @@
},
"work_switch": {
"name": "Work Switch"
},
"water_model_power_save": {
"name": "Power Save Mode"
},
"water_model_go_out": {
"name": "Away Mode"
}
}
}

View File

@@ -320,6 +320,13 @@
"thermostat": {
"name": "温控器",
"state_attributes": {
"preset_modes": {
"state": {
"auto": "自动",
"link": "联动",
"manual": "手动"
}
},
"fan_mode": {
"state": {
"silent": "静音",
@@ -1569,6 +1576,12 @@
},
"heat_temp_set": {
"name": "制热设定温度"
},
"tw1_in_water_temp": {
"name": "进水温度"
},
"tw1_out_water_temp": {
"name": "出水温度"
}
},
"light": {
@@ -2534,6 +2547,12 @@
},
"work_switch": {
"name": "工作开关"
},
"water_model_power_save": {
"name": "节能模式"
},
"water_model_go_out": {
"name": "外出模式"
}
}
}