Can you try this version? Just download the file and put it under custom_components/climate
. See the first post for detailed instructions.
I will try it later, but at the first look, the only diffrence is, that the if was changed and the add_devices is inside this if.
But the problem i assumed is still the same, only the room_names are looped not the room_data.
2018-11-20 09:12:51 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo2
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/netatmo2.py”, line 70, in setup_platform
for room_name in room_data.get_room_names():
File “/config/custom_components/climate/netatmo2.py”, line 314, in get_room_names
self.setup()
File “/config/custom_components/climate/netatmo2.py”, line 329, in setup
self.homestatus = lnetatmo.HomeStatus(self.auth, home=self.home)
File “/config/deps/lib/python3.6/site-packages/netatmo_home/Thermostat.py”, line 125, in init
self.rawData = resp[‘body’][‘home’]
KeyError: ‘home’
Tested your version but all the test-devices disappeared (restarted twice to make sure). Reverted to the previous version and they got back.
I still can control only one
Thanks for the feedbar. I’ll take a closer look. Unfortunately I don’t have Netatmo valves myself. Which previous version exactly?
Yes, that’s the version.
My setup: 1 thermostat, 3 valves in other rooms (3 more on the way).
room_data
is an ThermostatData
object, there is nothing to iterate over.
I get this error:
2018-11-20 09:57:48 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo2
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/climate/netatmo2.py", line 71, in setup_platform
if room_name in config[CONF_ROOMS]:
KeyError: 'rooms'
Right, here is my config:
netatmo2:
api_key: [redacted]
secret_key: [redacted]
username: [redacted]
password: [redacted]
climate:
- platform: netatmo2
Now i get the following Error:
2018-11-20 10:55:48 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo2
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/climate/netatmo2.py", line 72, in setup_platform
if (room_name not in config.get(CONF_ROOMS) and
TypeError: argument of type 'NoneType' is not iterable
still no test devices
I modified one version and tested with my Netatmo thermostat+valve with auto discovery. To avoid duplicated devices, if you set auto discovery on, better keep only netatmo2:
section in configuration file (removing/commenting out the following two line).
climate:
- platform: netatmo2
Let me know if you have any issues.
I just tried your version, but I have no Thermostat only 2 x Valves, and I get the below error:
Log Details (ERROR)
Fri Nov 23 2018 15:04:46 GMT+0100 (Centraleuropæisk normaltid)
netatmo2: Error on device update!
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 251, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/app/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/netatmo2.py”, line 267, in update
self._data.update()
File “/usr/src/app/homeassistant/util/init.py”, line 324, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/climate/netatmo2.py”, line 355, in update
self.boilerstatus = self.homestatus.boilerStatus()
File “/config/deps/lib/python3.6/site-packages/netatmo_home/Thermostat.py”, line 251, in boilerStatus
relay_status = self.thermostatById(rid=None)
File “/config/deps/lib/python3.6/site-packages/netatmo_home/Thermostat.py”, line 172, in thermostatById
return self.default_thermostat
AttributeError: ‘HomeStatus’ object has no attribute ‘default_thermostat’
Thanks for reporting this, I corrected and you can re-pull to try. Modifications are:
# self.boilerstatus = self.homestatus.boilerStatus()
self.setpoint_duration = self.homedata.setpoint_duration[self.home]
if self.thermostat_type == 'NATherm1':
self.boilerstatus = self.homestatus.boilerStatus(rid=self.module_id)