Open toddeye opened 9 years ago
I think this was only because there wasn't a good way (or maybe any way) to help the user determine which thermostat is which. The expectation is that the user will have a known hostname or IP address for each thermostat. Otherwise, how do you know which one you're interacting with?
Perhaps if each is a different model, that would give you a way to tell them apart. Seems like an edge case though.
Ideas are welcome. If you want to implement multiple-thermostat discovery, that's fine with me as long as we have a clear user story.
discovery could query the name of the thermostat(s) and return the name, model etc, but personally I think the calling application should be responsible for associating the IP(s) with the location of an individual thermostat.
for index, tstat_host in enumerate(radiotherm.discover.discover_address()):
tstats.append(radiotherm.get_thermostat(tstat_host))
print(tstats[index].name)
{'raw': 'upstairs'}
{'raw': 'downstairs'}
What do you think?
Hi, Was wondering in discovery why you check for the case where you get > 1 thermostats but only return the first? Why not just return the thermostats as a list?
Thanks for the library.
Todd