Error setting up platform netatmo

Any advice?


2019-06-29 10:52:24 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 143, in setup_platform
    config.get(CONF_STATION)))
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 190, in __init__
    self._module_type = self.netatmo_data. \
AttributeError: 'NoneType' object has no attribute 'moduleByName'

What version? 0.95.4? What devices do you have? Weather station? Home coach?

Weather station

And which version of HA?

That error in 0.95.

Today I updated to 0.95.4 the sensor are still not there

Do you use discovery or manual config?

Manual config

Can you share your netatmo related config? Did you try discovery?


netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False

shall I put discovery true?

When I upgraded the version, I had to change discovery: true.
It worked for me.

1 Like

Yes. But deactivate your manual config in case you have sensors set up in your config explicitly.

I donèt understand this, how to deactivate?

Just comment the sensor config out.

so take all the below out?


netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: true

If that is everything you have configured this is the part to keep.

If you have set discovery: false, then, you should have defined the sensors you would like to get in HA like this:

# Example configuration.yaml entry
sensor:
  # Personal sensors
  - platform: netatmo
    station: STATION_NAME
    modules:
      module_name1:
        - temperature
      module_name2:
        - temperature
        - battery_vp

You don’t need all of that if you put discovery: true.

2 Likes

Oh ok, now I got it, thank you

@WhistleMaster perfectly explained.

Does it work for you?