@@ -102,7 +102,7 @@ def getParameter(key, default):
102102
103103#TODO# Undocumented (but would be very usefull) API : Access currently forbidden (403)
104104
105- # _POST_UPDATE_HOME_REQ = _BASE_URL + "/api/updatehome"
105+ _POST_UPDATE_HOME_REQ = _BASE_URL + "/api/updatehome"
106106
107107# For presence setting (POST BODY):
108108# _PRES_BODY_REC_SET = "home_id=%s&presence_settings[presence_record_%s]=%s" # (HomeId, DetectionKind, DetectionSetup.index)
@@ -275,7 +275,7 @@ def __init__(self, authData, home=None):
275275 resp = postRequest (_GETTHERMOSTATDATA_REQ , postParams )
276276 self .rawData = resp ['body' ]['devices' ]
277277 if not self .rawData : raise NoDevice ("No thermostat available" )
278- self .thermostatData = filter_home_data (rawData , home )
278+ self .thermostatData = filter_home_data (self . rawData , home )
279279 if not self .thermostatData : raise NoHome ("No home %s found" % home )
280280 self .thermostatData ['name' ] = self .thermostatData ['home_name' ]
281281 for m in self .thermostatData ['modules' ]:
@@ -824,7 +824,7 @@ def getStationMinMaxTH(station=None, module=None, home=None):
824824 r = devList .MinMaxTH (module = m )
825825 result [m ] = (r [0 ], lastD [m ]['Temperature' ], r [1 ])
826826 else :
827- if time .time ()- lastD [mname ]['When' ] > 3600 : result = ["-" , "-" ]
827+ if time .time ()- lastD [module ]['When' ] > 3600 : result = ["-" , "-" ]
828828 else :
829829 result = [lastD [module ]['Temperature' ], lastD [module ]['Humidity' ]]
830830 result .extend (devList .MinMaxTH (module ))
0 commit comments