hpeyerl/venstar_colortouch

Venstar API update now report C/F for T2000 thermostats

Closed this issue · 2 comments

T2000 Thermostat now reporting C/F and so I believe the if statements for these models need to be changed accordingly.

Venstar local API call - http://192.168../query/info
{"name":"DOWNSTAIRS","mode":2,"state":0,"activestage":0,"fan":0,"fanstate":0,"tempunits":0,"schedule":0,"schedulepart":1,"away":0,"spacetemp":80.0,"heattemp":61.0,"cooltemp":82.0,"cooltempmin":35.0,"cooltempmax":99.0,"heattempmin":35.0,"heattempmax":99.0,"setpointdelta":2,"availablemodes":0}

Please see following thread: home-assistant/core#74115

# T2xxx, T3xxx thermostats (and maybe more) always use Celsius in the API regardless of the display units # So handle this case accordingly if self.model.startswith(("T2", "T3")): # Always degC self.tempunits = self.TEMPUNITS_C logging.debug("Detected thermostat model %s, using temp units of Celsius", self.model) elif self.model in ["VYG-4900-VEN", "VYG-4800-VEN", "VYG-3900", "COLORTOUCH"]: # Same as display units self.tempunits = self.display_tempunits elif self.get_info("heattempmax") >= 40: # Heat max temp over 40, only possible if degF logging.warning("Unknown thermostat model %s, inferring API tempunits of Fahrenheit", self.model) self.tempunits = self.TEMPUNITS_F else: logging.warning("Unknown thermostat model %s, inferring API tempunits of Celsius", self.model) self.tempunits = self.TEMPUNITS_C return True

My apologies in advance that I can't fix this myself - just don't have the expertise

This seems to fix the issue

if self.model.startswith(("T2", "T3")):
  # Always degC
  #self.tempunits = self.TEMPUNITS_C
  self.tempunits = self.display_tempunits
  #logging.debug("Detected thermostat model %s, using temp units of Celsius", self.model)

Sorry I don't know how to commit this change

Fixed in 0.17 thanks to @gcomeaux