Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netatmo integration failing to set up - NLTS #83020

Closed
Donnit opened this issue Nov 30, 2022 · 10 comments · Fixed by #85016
Closed

Netatmo integration failing to set up - NLTS #83020

Donnit opened this issue Nov 30, 2022 · 10 comments · Fixed by #85016
Assignees

Comments

@Donnit
Copy link

Donnit commented Nov 30, 2022

The problem

Netatmo integration fails to setup. Installing the integration is successful both through configuration.yaml and HA Cloud, authentication is successful, but on the HA Integrations page the Netatmo item is highlighted in red and the text "Failed to set up" exists. I tried uninstalling and reinstalling the integration but its always the same result.

What version of Home Assistant Core has the issue?

2022.11.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

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: 23:13:38 (1 occurrences) 
Last logged: 23:13:38

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 'NLTS'

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

Additional information

Similar to #81411 but with a different not valid DeviceType.
@cgtobi fixed the previous one.

My domotic system is all branded Biticino with Netatmo devices, for a total of about 50 devices as follows:

  • 1 DIN gateway FC80GT
  • many dimmer switches N4411C
  • many shutter controls N4027C
  • 4 connected modules for socket N4531C
  • many lighting micro module 3584C
  • 1 wireless motion sensor 3585C
  • 1 Wireless Night&Day scenario control N4574CW
  • 1 Wireless Home&Away scenario control N4570CW
  • 1 DIN smart relay for light control FC80RC
  • 2 Smarter with Netatmo thermostats XW8002
@home-assistant
Copy link

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
Copy link

brantmacga commented Dec 1, 2022

I believe NLTS is a motion detector.

edit.... I see your device list. NLTS is the BTI-3585C wireless motion sensor.

@Donnit
Copy link
Author

Donnit commented Dec 1, 2022

I believe NLTS is a motion detector.

edit.... I see your device list. NLTS is the BTI-3585C wireless motion sensor.

I supposed so, because it's a "new" device. Should I try to power off it or is it enough to remove from Home+Control?

Imho, when a sensor is not recognized the Integration should not fail, just discard that sensor.

@brantmacga
Copy link

I’m pretty sure you’d have to remove it from your gateway, not just power off.

These devices just arrived in the US and I should have mine in a week or so. Glad you reported it already, hopefully all of this is sorted out soon.

@Donnit
Copy link
Author

Donnit commented Dec 3, 2022

I confirm that removing it from Home+Control the integration load successfully. I hope you will have a chance to add the new sensor asap. Thank you very much, I will wait for you.

@brantmacga
Copy link

brantmacga commented Dec 3, 2022 via email

@cgtobi
Copy link
Contributor

cgtobi commented Dec 4, 2022

A fix for this has been push upstream. I'm currently waiting for review and a new release to bring it to HA.

@Donnit
Copy link
Author

Donnit commented Dec 7, 2022

A fix for this has been push upstream. I'm currently waiting for review and a new release to bring it to HA.

Thank you very much!

@Cogision
Copy link

Is it still under review?

@cgtobi cgtobi mentioned this issue Jan 2, 2023
19 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants