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
71.07k stars 29.73k forks source link

Multiple AirTouch5 devices won't add. #112567

Open cemilbrowne opened 6 months ago

cemilbrowne commented 6 months ago

The problem

When adding a second AirTouch5 console (I have an upstairs and downstars), the integration adds, but no devices/entities are found. In the logs, there are errors as below:

Platform airtouch5 does not generate unique IDs. ID ac_0 already exists - ignoring climate.downstairs_ac
Platform airtouch5 does not generate unique IDs. ID zone_0 already exists - ignoring climate.kitchen
Platform airtouch5 does not generate unique IDs. ID zone_1 already exists - ignoring climate.library
Platform airtouch5 does not generate unique IDs. ID zone_2 already exists - ignoring climate.basement

When adding the upstairs AC, same ids are created, which fails.

What version of Home Assistant Core has the issue?

2024.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

AirTouch5

Link to integration documentation on our website

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

Diagnostics information

No response

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 6 months ago

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

Code owner commands Code owners of `airtouch5` 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 airtouch5` 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)


airtouch5 documentation airtouch5 source (message by IssueLinks)

danzel commented 6 months ago

Yep this sounds like a bug. I had assumed that _attr_unique_id was per entry (per airtouch system configured), from this error it sounds like it actually needs to be unique across the component/integration.

My guess on fixing it would be to change the places we assign _attr_unique_id to include something unique (the IP is probably the only thing we have) and add a migration, sort of like in this PR: https://github.com/home-assistant/core/pull/107087

I don't have time to look at this at the moment sorry.

nirmalnpatel commented 5 months ago

+1 - I am also impacted by this. Please help to fix it.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

cemilbrowne commented 2 months ago

hi @danzel - anything I can do to help support you on this one?

danzel commented 2 months ago

Implement it as I noted above (Probably check with a HA dev what to use in the ID, I assume IP address because we don't have anything else) I'll help on a review, I don't have time to implement this though sorry.

cemilbrowne commented 2 months ago

OK; playing with it now. Let me see what I can do. We can't use IP (according to the docs), but maybe integration ID.

bojo-4-sho commented 2 months ago

Hi @cemilbrowne and @danzel . I am running two completely independent and separate airtouch5 systems on one network and I completely forgot that I had fiddled with the project (locally only) to make it work. I am not a python guru nor a programmer but I believe what I did was ensure my systems had unique AC_numbers assigned to them, which you can do in the settings on the consoles, then I modified the code to change things where it was like "zone number" to be "ac_number--zone_number".

I don't know the best way to share my custom_components folder with danzel but if its something that might be of assistance in progressing this issue Id be happy to do it. Its definitely not the correct way to fix the issue, but its a functional one.

nirmalnpatel commented 2 months ago

@bojo-4-sho - Can you please add some more information about which line of code and which file did you make the changes to? If you can share the step-by-step instructions, it will be great. thanks. :)

bojo-4-sho commented 2 months ago

@bojo-4-sho - Can you please add some more information about which line of code and which file did you make the changes to? If you can share the step-by-step instructions, it will be great. thanks. :)

There are quite a few. Attached is what is currently running in my custom components folder. As I mentioned above, its not the correct way, but its functional. airtouch5_JUNE2024.zip

nirmalnpatel commented 2 months ago

@bojo-4-sho - Can you please add some more information about which line of code and which file did you make the changes to? If you can share the step-by-step instructions, it will be great. thanks. :)

There are quite a few. Attached is what is currently running in my custom components folder. As I mentioned above, its not the correct way, but its functional. airtouch5_JUNE2024.zip

Thank you very much. This has worked. Really appreciate your help.