core icon indicating copy to clipboard operation
core copied to clipboard

Use DataUpdateCoordinator for Transmission

Open engrbm87 opened this issue 3 years ago • 2 comments

Breaking change

Remove configurable scan_interval option in favor of using the update_entity service. This has been suggested in other integrations so I applied it here as well. This is considered as breaking change because existing users who have set a custom value for the scan_interval will get the default value after the update.

Proposed change

  • Use Dataupdatecoordinator for transmission.
  • Remove the scan_interval option.
  • Move the coordinator into a sperate file coordinator.py.
  • Use self._attr_... where possible.

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)
  • [x] Breaking change (fix/feature causing existing functionality to break)
  • [x] Code quality improvements to existing code or addition of tests

Additional information

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

Checklist

  • [x] The code change is tested and works locally.
  • [x] 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] The code has been formatted using Black (black --fast homeassistant tests)
  • [x] 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:

  • [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 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.
  • [x] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • [ ] No score or internal
  • [ ] 🥈 Silver
  • [ ] 🥇 Gold
  • [ ] 🏆 Platinum

To help with the load of incoming pull requests:

engrbm87 avatar May 26 '22 11:05 engrbm87

Hey there @jphutchins, mind taking a look at this pull request as it has been labeled with an integration (transmission) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Hello @frenck , can I get your feedback regarding the scan_interval option for this integration. I had a similar discussion for the mikrotik integration (comment) where we decided to make the update_interval fixed and not provide a scan_interval option. Should we do the same here. Taking into consideration that the scan_interval option is already existing. Where in the mikrotik integration it was using the default 10 seconds for device_scanners.

engrbm87 avatar Aug 05 '22 08:08 engrbm87

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Apr 21 '23 23:04 github-actions[bot]