Is there anyone who is using the "Thermostat" Class ?
For me this was not working.
I have changed some of the code and now I can use the data from Relay and Thermostat.
# self.thermostatData = filter_home_data(self.rawData, home)
# if not self.thermostatData : raise NoHome("No home %s found" % home)
# OLD API
# Standard the first Relaystation and Thermostat is returned
# self.rawData is list all station
for Relay in self.rawData:
self.Relay_Plug = Relay # only last will be returnd
for thermostat in Relay['modules']:
self.thermostat
self.defaultThermostat = thermostat['module_name'] #self.the$
self.defaultThermostatId = thermostat['_id']
# self.defaultModule = thermostat['modules'][0]
I think it is even better to do
` def Relay_Plug(self):
for Relay in self.rawData:
return Relay
def Thermostat_Data(self):
for thermostat in self.Relay_Plug['modules']:
return thermostat
`
maybe there is even some checking necessary
I find it strange that the 'keywords' are different, but that is possible because of multiple kinds of thermostat
Is there anyone who is using the "Thermostat" Class ? For me this was not working. I have changed some of the code and now I can use the data from Relay and Thermostat.
I think it is even better to do ` def Relay_Plug(self): for Relay in self.rawData: return Relay
` maybe there is even some checking necessary
I find it strange that the 'keywords' are different, but that is possible because of multiple kinds of thermostat
Kind regards