georgezhao2010 / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
1.43k stars 234 forks source link

Current temperature HEAT PUMP C3 #409

Open fagallo opened 11 months ago

fagallo commented 11 months ago

HA core version

2023.11.3

Intergration version

0.3.22

Device type and model

Heat Pump Wi-Fi Controller 171H120F (0) da Midea

Used App

MSmartHome

The description of problem

current_temperature is null

This is state of climate:

hvac_modes: off, auto, cool, heat min_temp: 17 max_temp: 30 target_temp_step: 0.5 current_temperature: null temperature: 21 zone1_power: true zone2_power: false dhw_power: false zone1_curve: true zone2_curve: false disinfect: false fast_dhw: false zone_temp_type: false, false zone1_room_temp_mode: true zone2_room_temp_mode: false zone1_water_temp_mode: false zone2_water_temp_mode: false silent_mode: true eco_mode: false tbh: false mode: 3 mode_auto: 3 zone_target_temp: 40, 40 dhw_target_temp: 39 room_target_temp: 21 zone_heating_temp_max: 65, 65 zone_heating_temp_min: 35, 35 zone_cooling_temp_max: 25, 25 zone_cooling_temp_min: 5, 5 room_temp_max: 30 room_temp_min: 17 dhw_temp_max: 60 dhw_temp_min: 20 tank_actual_temperature: 25 target_temperature: 21, 21 temperature_max: 30, 30 temperature_min: 17, 17 total_energy_consumption: 113 status_heating: false status_ibh: false total_produced_energy: 400 outdoor_temperature: 14 error_code: 0 icon: mdi:air-conditioner friendly_name: Pompa di calore supported_features: 1

The logs

No response

fagallo commented 11 months ago

current temperature is the indoor temperature detected from HMI.

In the climate.py at class MideaC3Climate(MideaClimate)::

@property
    def current_temperature(self):
        return None

Why return none? and not :

return self._device.get_attribute(C3Attributes.current_temperature)