Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermostat not working #65

Closed
JurgenLB opened this issue Oct 7, 2023 · 1 comment
Closed

Thermostat not working #65

JurgenLB opened this issue Oct 7, 2023 · 1 comment

Comments

@JurgenLB
Copy link
Contributor

JurgenLB commented Oct 7, 2023

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

Kind regards

@JurgenLB
Copy link
Contributor Author

this is resolved in #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant