fustom / ariston-remotethermo-home-assistant-v3

Ariston NET remotethermo integration for Home Assistant based on API
MIT License
160 stars 38 forks source link

Add target temperature value in python-ariston-api #279

Closed robertomontinaro80 closed 8 months ago

robertomontinaro80 commented 9 months ago

Hi @fustom I think it would be useful to add in python-inariston-api the following function in galevo_device.py:

def get_target_temp_value(self, zone: int) -> int: """Get zone comfort temp value""" return self._get_item_by_id( ThermostatProperties.ZONE_DESIRED_TEMP, PropertyType.VALUE, zone )

So it could be used in ariston-remotethermo-home-assistant-v3 project in the climate.py to fix the wrong value displayed for target temp. Below the proposed fix: FROM: @property def target_temperature(self) -> float: """Return the target temperature for the device.""" return self.device.get_comfort_temp_value(self.zone) TO @property def target_temperature(self) -> float: """Return the target temperature for the device.""" return self.device.get_target_temp_value(self.zone)

Hope this could be useful. Thanks.