core: ValueError: 'BNOT' is not a valid DeviceType

The problem

Since few day after electrical shutdown the temperature from netatmo integration is not displayed and the folowing error is displayed in the logs:

Détails du journal (ERREUR) Logger: homeassistant.config_entries Source: config_entries.py:399 First occurred: 17 octobre 2023 à 17:21:04 (2 occurrences) Last logged: 19 octobre 2023 à 08:23:17

Error setting up entry Home Assistant Cloud for netatmo Traceback (most recent call last): File “/usr/local/lib/python3.11/site-packages/pyatmo/home.py”, line 72, in get_module return getattr(modules, module[“type”])( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module ‘pyatmo.modules’ has no attribute ‘BNOT’

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/src/homeassistant/homeassistant/components/netatmo/init.py”, line 185, in async_setup_entry await data_handler.async_setup() File “/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py”, line 153, in async_setup await self.subscribe(ACCOUNT, ACCOUNT, None) File “/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py”, line 244, in subscribe await self.async_fetch_data(signal_name) File “/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py”, line 200, in async_fetch_data await getattr(self.account, self.publisher[signal_name].method)( File “/usr/local/lib/python3.11/site-packages/pyatmo/account.py”, line 69, in async_update_topology self.process_topology() File “/usr/local/lib/python3.11/site-packages/pyatmo/account.py”, line 58, in process_topology self.homes[home_id] = Home(self.auth, raw_data=home) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/pyatmo/home.py”, line 49, in init self.modules = { ^ File “/usr/local/lib/python3.11/site-packages/pyatmo/home.py”, line 50, in <dictcomp> module[“id”]: self.get_module(module) ^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/pyatmo/home.py”, line 78, in get_module return getattr(modules, “NLunknown”)( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/pyatmo/modules/module.py”, line 520, in init self.device_type = DeviceType(module[“type”]) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/enum.py”, line 712, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/enum.py”, line 1128, in new raise ve_exc ValueError: ‘BNOT’ is not a valid DeviceType

What version of Home Assistant Core has the issue?

2023.10.3

What was the last working version of Home Assistant Core?

2023.10.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Netatmo

Link to integration documentation on our website

https://www.home-assistant.io/integrations/netatmo

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Détails du journal (ERREUR)
Logger: homeassistant.config_entries
Source: config_entries.py:399
First occurred: 17 octobre 2023 à 17:21:04 (2 occurrences)
Last logged: 19 octobre 2023 à 08:23:17

Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 72, in get_module
    return getattr(modules, module["type"])(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pyatmo.modules' has no attribute 'BNOT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 185, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 153, in async_setup
    await self.subscribe(ACCOUNT, ACCOUNT, None)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 244, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 200, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.11/site-packages/pyatmo/account.py", line 69, in async_update_topology
    self.process_topology()
  File "/usr/local/lib/python3.11/site-packages/pyatmo/account.py", line 58, in process_topology
    self.homes[home_id] = Home(self.auth, raw_data=home)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 49, in __init__
    self.modules = {
                   ^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 50, in <dictcomp>
    module["id"]: self.get_module(module)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 78, in get_module
    return getattr(modules, "NLunknown")(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/modules/module.py", line 520, in __init__
    self.device_type = DeviceType(module["type"])
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc
ValueError: 'BNOT' is not a valid DeviceType

Additional information

I tried to reboot many times the netatmo relay and Home assistant but temperature still not accessible.

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Yes I do. App is created in netatmo dev and login data is set as application credentials in HA.