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
69.94k stars 29.03k forks source link

Netatmo (Legrand) Valena Life wireless switches not detected properly #120099

Open asg2ki opened 3 weeks ago

asg2ki commented 3 weeks ago

The problem

Some wireless switches are not detected in Home Assistant even though they are fully visible and manageable through the Legrand Home Control native app. From inside the attached diagnostic json file the MAC addresses for the missing wireless switches are clearly visible, nonetheless they don't have entities generated and therefore cannot be assigned within HA against other resources. Some of the wireless switches are showing up properly as entities, however not by their Home Control application defined name but rather in the "Unknown XX:XX:XX:XX:XX:XX" format where the X characters are representing the MAC address of the device.

Here is an example from the json file about a wireless (single button) switch (00:04:74:00:00:c7:68:56) that doesn't appear as an entity at all:

          {
            "id": "00:04:74:00:00:c7:68:56",
            "type": "NLT",
            "name": "**REDACTED**",
            "setup_date": 1718925120,
            "room_id": "1990978688",
            "bridge": "00:04:74:3a:6c:ba"
          }

Here is another wireless (double button) switch (00:04:74:00:00:b9:2d:4b) that appears as an entity however not with its Home Control based name but as an Unknown 00:04:74:00:00:b9:2d:4b definition.

           "id": "00:04:74:00:00:b9:2d:4b",
            "type": "NLD",
            "name": "**REDACTED**",
            "setup_date": 1716543003,
            "room_id": "184512849",
            "bridge": "00:04:74:3a:6c:ba"
          },
          {
            "id": "00:04:74:00:00:b9:2d:4b#1",
            "type": "NLD",
            "setup_date": 1716543003,
            "bridge": "00:04:74:3a:6c:ba"
          },
          {
            "id": "00:04:74:00:00:b9:2d:4b#2",
            "type": "NLD",
            "setup_date": 1716543003,
            "bridge": "00:04:74:3a:6c:ba"
          }

Both wireless switches are linked to the same target entity (micro module) which goes by 00:04:74:00:00:16:c9:2b MAC address and is fully visible in HA with its Home Control defined name.

          {
            "id": "00:04:74:00:00:16:c9:2b",
            "type": "NLM",
            "name": "**REDACTED**",
            "setup_date": 1689691462,
            "room_id": "1990978688",
            "bridge": "00:04:74:3a:6c:ba"
          }

This problem is very similar to the one described under issue #99616

What version of Home Assistant Core has the issue?

core-2024.6.3

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

config_entry-netatmo-319e2d4bba2400a2d0152b03f792151c.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks 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` Renames 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. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


netatmo documentation netatmo source (message by IssueLinks)

cgtobi commented 3 weeks ago

Well, those are not implemented as I don't see much sense in such entities as they cannot be controlled from what I can tell. What would be your use case?

asg2ki commented 3 weeks ago

The use case would be purely cosmetic so that I can assign the resources to various "HA areas" in my property.

For example I have a big house and a smaller one in the same property (each one with its own gateway) and between the two houses there is a large garden space. Each house does have its own external light controlled via micro module and assigned to their own relevant gateways.

I do have 4 wireless switches paired to the external lights (2 of them are programmed specifically to the big house while the other 2 to the small one), and they are placed across in pairs at each location so that I can control both house's external lights from each of them. The reason behind this implementation is so that it becomes possible for me to turn on both of the external lights at night while passing through the large garden space and also be able to turn them off when not needed on the other side and vice versa.

Of course you are absolutely right that those devices cannot be controlled due to their nature, however from the switches "inventory / knowledge" point of view within the same HA pane of glass it would be still very helpful to have them outlined by their names as it could become quite cumbersome task to identify which one goes where especially when some of them are actually appearing by their Unknown XX:XX:XX:XX:XX:XX entities while for others there are no entities crafted at all.

In HA's interface I defined the two houses as individual areas but unfortunately I can't assign the micro modules to multiple areas, so I was thinking that it would be nice to at least have an "outline" of the wireless switches to each area and name them accordingly after their target's function. And basically that's where I stumbled with the unavailability for some of them. Interestingly enough I found some of them appearing properly in HA, however not all of them but I suppose this could be due to the various switch types I'm using right now. Anyway I'm glad we clarified this is not a bug but a feature :)

Still it would be useful to have the wireless switches at least made available in the inventory (preferably also by their names) perhaps with initial state set to disabled so that they can later on be assigned to custom cards without the actual control on/off buttons. Like I said the use case would be purely cosmetic but from my point of view still a valid one.

Let me know your thoughts.