Adding support for Netatmo Thermostat

now I have this error:
File “/usr/local/lib/python3.4/site-packages/homeassistant/components/climate/init.py”, line 736, in supported_features raise NotImplementedError() NotImplementedError

I have updated the custom component for HA 0.59+

1 Like

where are the new components

Hey guys, can anyone help with some feedback regarding a possible breaking change in the Netatmo Thermostat component?

The PR is this https://github.com/home-assistant/home-assistant/pull/11345

Basically I’m updating “state” to be consistent with all other climate components to allow better UI representation of state.

Hi, not technical enough to comment/contribute on the actual change but do know it’s broken my thermostats in HA.
Have included the error messages I’m seeing in my log if that gives anyone a steer

Extract from Log
File “/usr/lib/python3.6/site-packages/homeassistant/components/climate/netatmo.py”, line 51, in setup_platform
for module_name in data.get_module_names():
File “/usr/lib/python3.6/site-packages/homeassistant/components/climate/netatmo.py”, line 164, in get_module_names
self.update()
File “/usr/lib/python3.6/site-packages/homeassistant/util/init.py”, line 306, in wrapper
result = method(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/climate/netatmo.py”, line 179, in update
self.target_temperature = self.thermostatdata.setpoint_temp
AttributeError: ‘ThermostatData’ object has no attribute ‘setpoint_temp’

scratch that last post…fiddled with configuration.yaml and back in business

Hello guys,

Thank’s gieljnssns for your amazing work !

I have updated my HA version to 0.70.1 and this is not working anymore.

I’ve got tree errors in logs :

    Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/netatmo.py", line 45, in setup_platform
    netatmo = get_component('netatmo')
TypeError: get_component() missing 1 required positional argument: 'comp_or_platform'




Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/binary_sensor/netatmo.py", line 74, in setup_platform
    if not data.get_camera_names():
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
    self.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 115, in update
    self.camera_data = lnetatmo.CameraData(self.auth, size=100)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/smart_home/Camera.py", line 78, in __init__
    self.default_camera = list(self.cameras[self.default_home].values())[0]
IndexError: list index out of range



Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/camera/netatmo.py", line 41, in setup_platform
    for camera_name in data.get_camera_names():
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
    self.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 115, in update
    self.camera_data = lnetatmo.CameraData(self.auth, size=100)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/smart_home/Camera.py", line 78, in __init__
    self.default_camera = list(self.cameras[self.default_home].values())[0]
IndexError: list index out of range

Do not hesitate if you need more informations.

Mike

I’ve the same issue/error here actually. I’d rebuilt HA from scratch recently and thought it was just me so kinda glad to hear someone else has the issue :slight_smile:

@gieljnssns any ideas?

WIth 0.71 again broken

2018-06-10 16:12:19 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/netatmo.py”, line 45, in setup_platform
netatmo = get_component(‘netatmo’)
TypeError: get_component() missing 1 required positional argument: ‘comp_or_platform’
2018-06-10 16:12:19 ERROR (SyncWorker_19) [homeassistant.components.sensor.netatmo] Module name: “Grandma outdoor” not found
2018-06-10 16:12:19 ERROR (MainThread) [homeassistant.components.sensor] netatmo: Error on device update!
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 244, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py”, line 269, in update
if data[‘rf_status’] >= 90:
KeyError: ‘rf_status’

@MickBru
@anon35356645
@Gav_in

I think I’ve updated the climate file for 0.71.
No need anymore for the custom_component netatmo hub, only the climate custom_component.

1 Like

There is also a breaking change in the netatmo climate api.
The whole netatmo climate component needs a rewrite.

https://dev.netatmo.com/en-US/resources/technical/reference/deprecated

we delete it?

You can delete it

Hi @gieljnssns

I’ve updated my HA to 0.71.0 and downloaded your last climate.py file.

I still have errors in the logs, and I only see one thermostat (I’ve got two).

Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/camera/netatmo.py", line 41, in setup_platform
    for camera_name in data.get_camera_names():
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
    self.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 115, in update
    self.camera_data = lnetatmo.CameraData(self.auth, size=100)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/smart_home/Camera.py", line 78, in __init__
    self.default_camera = list(self.cameras[self.default_home].values())[0]
IndexError: list index out of range

How can I help you finding the problem ?

Mike

Does your thermostat work again?

Have you deleted the netatmo.py file in custom_components?

yes it seems is working, I did not change the temperature though, since we have 30+C now all thermostats are off

Yes I did.

@MickBru
You can try to delete the
/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/smart_home
folder and the lnetatmo file in
/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/

the updated component is working 100% for me - can see both my thermostats and can change temperature.
thanks @gieljnssns