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

Bump arris-tg2492lg to 2.2.0 #107905

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

vanbalken
Copy link
Contributor

Breaking change

This update the Arris TG2492LG library to the lastest version. Biggest change is that the library now uses AIOHTTP.

Changelog: vanbalken/arris-tg2492lg@1.2.1...2.2.0

Proposed change

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

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

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
Contributor

@davet2001 davet2001 left a comment

Choose a reason for hiding this comment

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

Thanks @vanbalken, looks good. Just one question.

Also, do you have this hardware and have you tested on it?

Comment on lines -49 to +60
def get_device_name(self, device: str) -> str | None:
async def async_get_device_name(self, device: str) -> str | None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Was it necessary to make this function async? I couldn't see anything that needed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx for reviewing!

I've looked at other async device trackers and they too have only async methods. Therefore I'm in the understanding that everything should be async. If we can mix async and sync methods this method can indeed by a regular sync method.

For example:

async def async_scan_devices(self) -> list[str]:

Copy link
Contributor

Choose a reason for hiding this comment

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

A coroutine (as in this PR) is preferred over a sync method because the latter is allowed to block and thus has to be handed to an executor.

@home-assistant home-assistant bot marked this pull request as draft March 9, 2024 19:11
@home-assistant
Copy link

home-assistant bot commented Mar 9, 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.

@vanbalken
Copy link
Contributor Author

Thanks @vanbalken, looks good. Just one question.

Also, do you have this hardware and have you tested on it?

I've have this hardware and tested this on it.

Copy link
Contributor

@davet2001 davet2001 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@davet2001 davet2001 marked this pull request as ready for review March 12, 2024 21:40
@home-assistant home-assistant bot requested a review from davet2001 March 12, 2024 21:40
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Mar 13, 2024
@emontnemery emontnemery merged commit 74afed3 into home-assistant:dev Apr 18, 2024
53 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed dependency integration: arris_tg2492lg Quality Scale: No score small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants