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
73.4k stars 30.65k forks source link

AttributeError: module 'pyatmo.modules' has no attribute 'NLUO #81826

Closed brantmacga closed 1 year ago

brantmacga 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 'NLUO ValueError: 'NLUO' is not a valid DeviceType

These are the devices I have in my Netatmo installation

What version of Home Assistant Core has the issue?

2022.11.2

What was the last working version of Home Assistant Core?

No response

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: 5:57:52 PM (1 occurrences) 
Last logged: 5:57:52 PM

Error setting up entry Home Assistant Cloud 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 'NLUO'

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: 'NLUO' is not a valid DeviceType

Additional information

2022-11-08 17:57:52.645 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data

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)

cgtobi commented 1 year ago

Thanks for reporting. Do you have an idea what kind of device NLUO is?

brantmacga commented 1 year ago

I’m not sure what device it is

On Nov 9, 2022, at 11:52 AM, Tobias Sauerwein @.***> wrote:



Thanks for reporting. Do you have an idea what kind of device NLUO is?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F81826%23issuecomment-1309049598&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XpQ9UW%2BXu7b7FedNEZ9Cn8GKo2oGX5lnjzLfPfw5OjM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2SJ3KTEHPTTJIFBJWF3V5TWHPJDFANCNFSM6AAAAAAR237EJA&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X2vGAo7mYoLOSsSBTTog6cg2YWnm0fH9BqUhS6WCGbs%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

brantmacga commented 1 year ago

Thanks for reporting. Do you have an idea what kind of device NLUO is?

I've been searching the Legrand & Netatmo developer sites and can't find an answer. I've asked in the Netatmo dev forum. I'm sure Leslie will answer soon. I would almost swear I had an excel sheet once that listed all of them but now I can't find it. The search continues though.

brantmacga commented 1 year ago

From Netatmo …

NLUO = Plug-In dimmer switch NLUI = In-Wall ON/OFF switch Both are for North America market (Adorne/Radiant)

On Nov 9, 2022, at 11:52 AM, Tobias Sauerwein @.***> wrote:



Thanks for reporting. Do you have an idea what kind of device NLUO is?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F81826%23issuecomment-1309049598&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XpQ9UW%2BXu7b7FedNEZ9Cn8GKo2oGX5lnjzLfPfw5OjM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2SJ3KTEHPTTJIFBJWF3V5TWHPJDFANCNFSM6AAAAAAR237EJA&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X2vGAo7mYoLOSsSBTTog6cg2YWnm0fH9BqUhS6WCGbs%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

brantmacga commented 1 year ago

I’m not sure what device it is On Nov 9, 2022, at 11:52 AM, Tobias Sauerwein @.> wrote:  Thanks for reporting. Do you have an idea what kind of device NLUO is? — Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F81826%23issuecomment-1309049598&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XpQ9UW%2BXu7b7FedNEZ9Cn8GKo2oGX5lnjzLfPfw5OjM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2SJ3KTEHPTTJIFBJWF3V5TWHPJDFANCNFSM6AAAAAAR237EJA&data=05%7C01%7C%7C4db939c480444efa4af608dac272b9b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638036095239780083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X2vGAo7mYoLOSsSBTTog6cg2YWnm0fH9BqUhS6WCGbs%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.>

Still getting this error. Just mentioning again because I know you were pushing an update, and wasn’t sure if this fix was supposed to be included. Thanks again.