home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.55k stars 30.35k forks source link

AttributeError: module 'pyatmo.modules' has no attribute 'NLAS' #83050

Closed matilbianco closed 1 year ago

matilbianco commented 1 year ago

The problem

Netatmo integration "Failed to Set Up"

See these errors in the logs :

AttributeError: module 'pyatmo.modules' has no attribute 'NLAS' [...] ValueError: 'NLAS' is not a valid DeviceType

I don't know what is a NLAS but will ask to Leslie from Netatmo.

2 recent change in my HA installation :

What version of Home Assistant Core has the issue?

Home Assistant 2022.11.5

What was the last working version of Home Assistant Core?

Home Assistant 2022.11.4

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?

Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:199
First occurred: 10:04:53 (3 occurrences)
Last logged: 13:29:49

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, 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 151, in async_setup
    await self.subscribe(ACCOUNT, ACCOUNT, None)
  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 69, in async_update_topology
    self.process_topology()
  File "/usr/local/lib/python3.10/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.10/site-packages/pyatmo/home.py", line 49, in __init__
    self.modules = {
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 50, in <dictcomp>
    module["id"]: self.get_module(module)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 78, in get_module
    return getattr(modules, "NLunknown")(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 508, in __init__
    self.device_type = DeviceType(module["type"])
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 'NLAS' is not a valid DeviceType

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @cgtobi, mind taking a look at this issue as it has been labeled with an integration (netatmo) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `netatmo` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign netatmo` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


netatmo documentation netatmo source (message by IssueLinks)

brantmacga commented 1 year ago

NLAS is a wireless batteryless scene switch

matilbianco commented 1 year ago

Thanks @brantmacga this was also confirmed by Leslie from Legrand forum. @cgtobi is there a plan to support those ? I can maybe help testing those device against Netatmo API dev portal ?

matilbianco commented 1 year ago

Notice : i have tried to remove the NLAS and reload Netatmo integration : it works fine. Also my new smart valves were correctly recognised But still : if I want to use my baterryless switch, the integration keeps on failing…

cgtobi commented 1 year ago

This has been fixed in #85016.