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

Add config flow to Russound RIO integration #121262

Merged

Conversation

noahhusby
Copy link
Contributor

@noahhusby noahhusby commented Jul 4, 2024

Proposed change

I'm working on improving the stability of the Russound RIO integration. This is part one of a set of pull requests with feature improvements. This PR is dedicated to adding a config flow and adjacent tests to make the integration simpler to setup. I plan to add proper connection error handling, multi-instance capability, and expand the usage of the RIO protocol in coming pull requests. This includes a YAML importer for existing configurations so that this doesn't result in a breaking-change.

The config flow currently only supports a single instance (as defined in the manifest). I will be opening a PR for multi-instance support soon, but wanted to keep this PR dedicated for adding the config flow only.

Type of change

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

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @noahhusby

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant home-assistant bot added breaking-change cla-needed config-flow This integration migrates to the UI by adding a config flow has-tests integration: russound_rio labels Jul 4, 2024
@home-assistant home-assistant bot marked this pull request as draft July 4, 2024 22:38
@home-assistant
Copy link

home-assistant bot commented Jul 4, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@noahhusby noahhusby marked this pull request as ready for review July 4, 2024 22:41
@noahhusby noahhusby marked this pull request as draft July 5, 2024 00:19
@noahhusby noahhusby marked this pull request as ready for review July 5, 2024 00:19
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch 3 times, most recently from 3e72cf5 to 3c5b6b0 Compare July 5, 2024 05:47
jpbede
jpbede previously requested changes Jul 5, 2024
Copy link
Member

@jpbede jpbede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of thanks a lot for your contribution 🚀

Take a look at mpd, for example, to see how you can import the existing configuration into a config entry. In this way, you avoid having a breaking change.

@home-assistant home-assistant bot marked this pull request as draft July 5, 2024 06:33
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch from 3c5b6b0 to b74c591 Compare July 5, 2024 14:52
@noahhusby noahhusby requested a review from jpbede July 5, 2024 14:54
@noahhusby
Copy link
Contributor Author

noahhusby commented Jul 5, 2024

Thought about adding the YAML importer late last night, glad you caught it too 👍

We can remove the breaking-change label.

Note: I noticed that the .coveragerc was removed today. Not sure if the intention is only to get a more accurate coverage report, or to have all integration files covered. My media player file doesn't have a test file at the moment, but I intend to add that in a separate PR to not lose scope of the config flow.

@noahhusby noahhusby marked this pull request as ready for review July 5, 2024 14:59
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Jul 7, 2024
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch from 8a02b8f to 08ec235 Compare July 8, 2024 02:58
@home-assistant home-assistant bot marked this pull request as draft July 10, 2024 18:43
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch from c21915a to 0f2143c Compare July 10, 2024 19:34
@noahhusby noahhusby marked this pull request as ready for review July 10, 2024 19:35
@home-assistant home-assistant bot requested a review from joostlek July 10, 2024 19:35
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch from 0f2143c to a4f10cc Compare July 10, 2024 19:50
@noahhusby noahhusby force-pushed the refactor/russound_rio_config_flow branch from a4f10cc to d3c0ca1 Compare July 10, 2024 19:59
@joostlek joostlek merged commit abeac3f into home-assistant:dev Jul 10, 2024
39 of 40 checks passed
@noahhusby noahhusby deleted the refactor/russound_rio_config_flow branch July 10, 2024 21:04
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants