Problem with Netatmo (BTicino) integration "Error setting up entry Home Assistant Cloud for netatmo"

Hello,
I have a problem with Netatmo integration LINK.
I just configured my home assistant, hence I have very little experience with it, but I cannot make the netatmo implementation work properly.

Home Assistant Setup:

  • Rasberry Pi 4 Model B 4Gb
  • Home Assistant 2023.1.2
  • Supervisor 2022.12.1
  • Operating System 9.4
  • Frontend 20230104.0 - latest

I am trying to integrate my BTicino Living Now, which I understand should be supported by the Netatmo implementation. I also have a Netatmo weather station configured.

I follow all the setup steps, and I get no error. However, once the process is finished I get a “Failed to set up” and the following log. I tried to reload, delete and reinstall, but I always get the same error.

Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:199
First occurred: 3:56:36 PM (5 occurrences)
Last logged: 4:35:16 PM

Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 156, in async_setup
    await self.async_dispatch()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 280, in async_dispatch
    await self.subscribe(HOME, signal_home, None, home_id=home.entity_id)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 78, in async_update_status
    await self.homes[home_id].update(raw_data)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 132, in update
    self.rooms[room["id"]].update(room)
KeyError: '0'
1 Like

Hi Tobi, I’m tagging you as I’ve seen you own the implementation @cgtobi. I hope I am not doing anything wrong…

I tried using Account Credentials creating an app in Netatmo Dev, but I got the same error.
Here the full logs if they can help:

2023-01-15 08:58:38.302 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration dwains_dashboard which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-15 08:58:38.306 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-15 08:58:51.632 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 156, in async_setup
    await self.async_dispatch()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 280, in async_dispatch
    await self.subscribe(HOME, signal_home, None, home_id=home.entity_id)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 78, in async_update_status
    await self.homes[home_id].update(raw_data)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 132, in update
    self.rooms[room["id"]].update(room)
KeyError: '0'
2023-01-15 08:59:27.718 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from fe80::d6ef:f17:f74:9b00 (fe80::d6ef:f17:f74:9b00). Requested URL: '/auth/login_flow/ee86ce5d009509d4ee40af1089ad390b'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0)
2023-01-15 08:59:53.963 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 409, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.969 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 195, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.972 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for cover
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 208, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.977 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 618, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.982 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 62, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.986 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 573, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:53.990 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 83, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2023-01-15 08:59:55.361 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 156, in async_setup
    await self.async_dispatch()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 280, in async_dispatch
    await self.subscribe(HOME, signal_home, None, home_id=home.entity_id)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 78, in async_update_status
    await self.homes[home_id].update(raw_data)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 132, in update
    self.rooms[room["id"]].update(room)
KeyError: '0'
2023-01-15 09:00:11.520 ERROR (MainThread) [frontend.js.latest.202301100] :0:0 ResizeObserver loop completed with undelivered notifications.
2023-01-15 09:00:34.142 ERROR (MainThread) [frontend.js.latest.202301100] :0:0 ResizeObserver loop completed with undelivered notifications.
2023-01-15 09:00:54.605 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 156, in async_setup
    await self.async_dispatch()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 280, in async_dispatch
    await self.subscribe(HOME, signal_home, None, home_id=home.entity_id)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 78, in async_update_status
    await self.homes[home_id].update(raw_data)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 132, in update
    self.rooms[room["id"]].update(room)
KeyError: '0'
2023-01-15 09:02:55.579 ERROR (MainThread) [frontend.js.latest.202301100] :0:0 ResizeObserver loop completed with undelivered notifications.
2023-01-15 09:11:45.359 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Netatmo Credentials for netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 156, in async_setup
    await self.async_dispatch()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 280, in async_dispatch
    await self.subscribe(HOME, signal_home, None, home_id=home.entity_id)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 78, in async_update_status
    await self.homes[home_id].update(raw_data)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 132, in update
    self.rooms[room["id"]].update(room)
KeyError: '0'

anyone here who could help?

:frowning:

I’ve discovered the same issue in my logs.
I think there is some components that the integration does not recognize. in my case i think is the bticino 300eos…

I’ve discovered that some devices were not assigned to a room.
I assigned all to a room and restarting home assistant the error disappeared.

hope this will help

1 Like

I also have the 300eos, I will try removing it and re-install

It is indeed the BTicino 300eos that was causing the issue…thank you!

I wonder how I could use it now…I will open a bug for that.

Michele

Hi everyone,

I have exactly the same problem and same log file.
BTicino 300EOS + HA 2023.4.2

All devices are already assigned to a room.

Have you managed to integrate the EOS now ?

Thank’s.

Have a good day,
Florent

i have the same problem with 300EOS

Anyone managed to add 300EOS to HA yet?