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

Dont attempt to add devices to disabled zwave config #22461

Merged

Conversation

karwosts
Copy link
Contributor

Proposed change

On my install clicking "Add a z-wave device" from integrations or devices page would always hang and generate an error.

It is because this button attempts to add the device to the first config entry for zwave_js integrations. But I have two zwave_js integration config entries, the first one I disabled when I migrated from an old coordinator, and a second config entry for my new coordinator.

We should instead try to add device to the first enabled config entry (or raise a complaint if there are no enabled).

I added the same filter for zha and matter as it seemed sensical to do so, but I did not test those flows.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@MindFreeze MindFreeze merged commit 67ac488 into home-assistant:dev Oct 22, 2024
17 checks passed
@MindFreeze
Copy link
Contributor

Wait. This done raise a complaint if no configs are enabled but I don't see how it would select the second config if the first is disabled. Unless we already do this elsewhere?

@MindFreeze
Copy link
Contributor

Ah, it will select the enabled one only for zwavejs. I was looking at the other protocols

@karwosts karwosts deleted the disabled-zwave-config-add-device branch October 22, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants