Fetch Twitch followed channels during setup instead of during configuration
Proposed change
Currently the integration only creates sensors when added to an instance requiring a user to reconfigure to have new channels added as sensors . Given users changing who they follow on Twitch is not a rare event, the purpose of the change is to update the sensor list a bit more frequently and allow the user to reload integration to have more sensors added. (#118740)
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [X] 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
- This PR is related to issue: #118740
- Created as a draft PR because local testing is working but having issues fixing the automated tests.
Checklist
- [X] The code change is tested and works locally.
- [ ] Local tests pass. Your PR cannot be merged unless tests pass
- [X] There is no commented out code in this PR.
- [X] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [X] 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:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [X] 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 runningpython3 -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.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Hey there @joostlek, mind taking a look at this pull request as it has been labeled with an integration (twitch) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of twitch can trigger bot actions by commenting:
@home-assistant closeCloses the pull request.@home-assistant rename Awesome new titleRenames the pull request.@home-assistant reopenReopen the pull request.@home-assistant unassign twitchRemoves the current integration label and assignees on the pull request, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.
Hi there @DHandspikerWade 👋
Just checking, this PR is currently in draft for quite some time. Additionally, there is a merge conflict and the CI is failing. Are you planning on working on this PR in the short term?
If not, can we close it until time becomes available? As in, you can always re-open when you are ready to work on it again.
../Frenck
Closing due to lack of time currently to address the issues with the tests.