File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -416,6 +416,28 @@ def indoorTemperature(self):
416416 if 'indoorTemperature' in self ._lyric_api ._device (self ._locationId , self ._deviceId ):
417417 return self ._lyric_api ._device (self ._locationId , self ._deviceId )['indoorTemperature' ]
418418
419+ @temperatureSetpoint .setter
420+ def temperatureSetpoint (self , setpoint , mode = None ):
421+ if mode is None :
422+ if setpoint > indoorTemperature :
423+ mode = 'Heat' ;
424+ else :
425+ mode = 'Cool' ;
426+
427+ if mode == 'Cool' :
428+ data = '{'
429+ '"mode": ' + mode + ','
430+ '"coolSetpoint": ' + setpoint + ','
431+ '}'
432+
433+ if mode == 'Heat' :
434+ data = '{'
435+ '"mode": ' + mode + ','
436+ '"heatSetpoint": ' + setpoint + ','
437+ '}'
438+
439+ self ._set (self , 'devices/thermostats/' + self .deviceId , data , locationId :self ._locationId ):
440+
419441 @property
420442 def outdoorTemperature (self ):
421443 if 'outdoorTemperature' in self ._lyric_api ._device (self ._locationId , self ._deviceId ):
You can’t perform that action at this time.
0 commit comments