RobHofmann / HomeAssistant-GreeClimateComponent

Custom Gree climate component written in Python3 for Home Assistant. Controls AC's supporting the Gree protocol.
GNU General Public License v3.0
317 stars 105 forks source link

Temperature adjustment increments for instances using imperial (Fahrenheit) #172

Open sandersjds opened 5 months ago

sandersjds commented 5 months ago

This is a followup from the issue related to the temperature display for Celsius vs Fahrenheit. If the HA instance is set to use imperial, temperature adjustments are currently a bit erratic. I just wanted to note what I've found in case someone who actually knows python is interested in working this out before I cobble together some functioning code to submit another PR.

According to the notes in the readme for gree-remote:

  • "SetTem" and "TemUn": set temperature and temperature unit
    • if TemUn = 0, SetTem is the set temperature in Celsius
    • if TemUn = 1, SetTem is the set temperature is Fahrenheit

This means:

  1. the integration will need to know if HA is sending data back in Celsius or Fahrenheit
  2. that state will need to be translated into the enum values (C = 0; F = 1)
  3. any time SetTem is used (maybe here or here) to send an updated target temperature to the device, TemUn will also need to be sent with the value derived from the HA instance config state
mottihoresh commented 4 months ago

Have you found a solution yet? I am having the same issue, but I don't have too much experience with Python.