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 ZHA dependencies #104335

Merged
merged 13 commits into from
Nov 29, 2023
Merged

Bump ZHA dependencies #104335

merged 13 commits into from
Nov 29, 2023

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Nov 21, 2023

Breaking change

ZHA will no longer auto-reconnect to your USB coordinator if it is unplugged. Connections to network coordinators will still be retried, however. You will need to reload the integration to reconnect.

Proposed change

Bump all ZHA dependencies:

This is a small rearchitecture of zigpy:

  • offload reconnection logic to the application, in this case ZHA
  • introduce support for the Conbee III (thanks @Haerteleric!)
  • load coordinator model, manufacturer, and firmware version
    image

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 Black (black --fast 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:

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @TheJulianJES, mind taking a look at this pull request as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign zha Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@puddly puddly marked this pull request as ready for review November 28, 2023 00:04
@puddly puddly requested review from dmulcahey, Adminiuga and a team as code owners November 28, 2023 00:04
@TheJulianJES
Copy link
Member

TheJulianJES commented Nov 28, 2023

From the breaking changes:

ZHA will also no longer continue reconnecting in the background if the serial port becomes unavailable (e.g. you unplug the coordinator). You will need to reload the integration manually.

Regarding the above, I do wonder if this will (negatively) affect instances with LAN/WiFi coordinators, as a small outage can sometimes be caused if a switch/AP/router is updated or if the LAN isn't ready/up when Home Assistant first starts.

Other integrations (like ESPHome) continuously try to reconnect in the background.
Maybe a config option for infinite retries (with a "longer" delay between tries) would be useful for some cases?

Copy link
Member

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

Other than my above comment, the actual changes LGTM.
Also did some quick tests and everything seems to work as expected.

@home-assistant home-assistant bot marked this pull request as draft November 28, 2023 09:10
@home-assistant
Copy link

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.

@puddly
Copy link
Contributor Author

puddly commented Nov 28, 2023

Regarding the above, I do wonder if this will (negatively) affect instances with LAN/WiFi coordinators, as a small outage can sometimes be caused if a switch/AP/router is updated or if the LAN isn't ready/up when Home Assistant first starts.

Transient connection errors always result in a ConfigEntryNotReady so network coordinators not being reachable or the network being down should be handled as you'd expect. The only thing that won't be is the serial port being double-accessed, the USB device being unplugged, and unrecoverable connection issues with the radio (e.g. NVRAM).

@puddly puddly marked this pull request as ready for review November 28, 2023 16:35
@TheJulianJES
Copy link
Member

Transient connection errors always result in a ConfigEntryNotReady

Ah, yeah. Should have looked closer. For other people reading the breaking changes, maybe mention that network coordinators aren't affected?

@MartinHjelmare MartinHjelmare marked this pull request as draft November 28, 2023 21:39
@puddly puddly marked this pull request as ready for review November 29, 2023 04:37
@TheJulianJES TheJulianJES mentioned this pull request Nov 29, 2023
20 tasks
Copy link
Member

@MartinHjelmare MartinHjelmare 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!

@frenck
Copy link
Member

frenck commented Nov 29, 2023

Rebased to resolve a merge conflict after merging #104683

@frenck frenck merged commit bd8f01b into home-assistant:dev Nov 29, 2023
53 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ZHA] Zigbee fails to set up after 2023.11.0 upgrade
6 participants