This work is based on the work of gieljnssns and many others, which improves the Netatmo climate component to support multiple thermostats/valves. To try/test this component, you can follow the following steps:
For HA version >= 0.89:
Create a directory netatmo in config/custom_components/.
Known issues:
Sometimes the HTTP request to api.netatmo.com might fail and if it happens during starting HA, the thermostat(s)/valve(s) cannot appear in the frontend. Usually this requires more restarting tries to fix. And there is a testing version of pyatmo file to automatically retry. To use this, you have to replace your file smart_home/Thermostat.py in the installed pyatmo module with the following gist https://gist.github.com/shanbs/e2f7363924a58e871d9aaceaab59125d
All testing results and issue reports are welcome.
Update 2019-01-25: Updated climate/netatmo.py, enabling multiple homes in the case discovery set to false. The configuration format is also changed (updated in the post).
Update 2019-01-29: Updated climate/netatmo.py, optimised the platform setup procedure.
Update 2019-02-27: Added new files and procedures for HA == 0.88.
Update 2019-03-03: PR has been merged into dev branch of HA.
Update 2019-03-07: Added new files and procedures for HA >= 0.89.
Thanks, I think with this it’s unlikely that people mess something up while setting up this component. Like mixing up the netatmo.py files.
Looking at your post I have another suggestion.
I think it would be even easier for people if you add something like
“This file goes to config/custom_components/”
and
“This file goes to config/custom_components/climate/”
in the top section of the netatmo.py files.
Some people will download both files and than they have them both in their download folder, which could mess thing up (50/50 chance).
So I think this should be the first line.
Just finished to test your PR with my account and everything worked as expected, nice work!
My setup:
House with 1 thermostat (parents)
House with 1 thermostat (grandparents)
House with 3 thermostat (mine)
With discovery: true I can see all the 5 thermostats and with discovery: false and setting up the climate components I can show the 3 thermostats in my house.
It’s not my use case but someone may need to setup multiple homes, is it possible? I think that an example or just a warning about the impossibility could be useful
I have seen you are still working on having this PR accepted, thank you for your dedication
In the meantime, can we still simply copy some files in custom components to work with it or it’s better to wait a bit more for the official release ?
I ask because it seems the two links at the start of this post don’t point to the correct files anymore.
Hi sometimes ago I updated the custom component for ther excellent job of @Baosong_Shan, but stopped following the thread (and subsequent modification to the component) because my installation was working perfectly.
Now, this morning, with updating to 0.88 all stopped working, has this been fixed already, or not yet? Thank you
2019-02-21 10:18:57 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.netatmo2.climate. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 147, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.netatmo2.climate'; 'custom_components.netatmo2' is not a package