Skip to content

Bump ZHA to 1.4.0 - #172357

Merged
frenck merged 16 commits into
home-assistant:devfrom
puddly:puddly/zha-cluster-handler-removal
May 27, 2026
Merged

frenck merged 16 commits into
home-assistant:devfrom
puddly:puddly/zha-cluster-handler-removal

Conversation

@puddly

@puddly puddly commented May 27, 2026

Copy link
Copy Markdown
Contributor

Proposed change

This PR bumps ZHA from 1.3.1 to 1.4.0.

This is a major internal refactor of ZHA that more tightly couples entities to clusters. It should not result in any user-visible changes.

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:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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 diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

@puddly puddly added this to the 2026.6.0b0 milestone May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 14:09
@home-assistant home-assistant Bot added cla-signed dependency Pull requests marked as a dependency upgrade has-tests integration: zha Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage Top 50 Integration is ranked within the top 50 by usage labels May 27, 2026
@home-assistant

Copy link
Copy Markdown
Contributor

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 mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from 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 update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request bumps the ZHA dependency to 1.4.0 and updates the Home Assistant ZHA integration and tests to align with ZHA’s refactored entity/cluster model.

Changes:

  • Bump zha from 1.3.1 to 1.4.0 across manifest and consolidated requirements.
  • Update ZHA siren/websocket reconfigure plumbing and device actions to match the new ZHA library APIs.
  • Refresh ZHA tests and diagnostics snapshots for the new library output/behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/components/zha/test_websocket_api.py Updates test events and handler calls for the new device/cluster reconfigure events.
tests/components/zha/test_siren.py Updates siren tests to use new ZHA siren enums and expected IAS WD request kwargs.
tests/components/zha/test_device_action.py Adjusts action test to emit events via zigpy cluster listeners instead of cluster handlers.
tests/components/zha/test_cover.py Updates cover test expectations for attribute reads under the new ZHA behavior.
tests/components/zha/snapshots/test_diagnostics.ambr Updates diagnostics snapshot output/version for ZHA 1.4.0.
requirements_all.txt Bumps pinned zha version to 1.4.0.
homeassistant/components/zha/websocket_api.py Adapts websocket/admin services and schemas to new siren/platform APIs and reconfigure signal.
homeassistant/components/zha/siren.py Switches siren tone constants to ZHA-provided enums.
homeassistant/components/zha/manifest.json Bumps integration requirement to zha==1.4.0.
homeassistant/components/zha/helpers.py Refactors reconfigure event forwarding and filters virtual platform entities; improves error translation.
homeassistant/components/zha/device_action.py Reworks available actions and execution to use cluster IDs and zigpy/zhaquirks types.
homeassistant/components/zha/const.py Adds dispatcher signal constant for device reconfigure progress events.

Comment thread tests/components/zha/test_siren.py
Comment thread homeassistant/components/zha/device_action.py
Comment thread homeassistant/components/zha/websocket_api.py
Comment thread homeassistant/components/zha/websocket_api.py
Comment thread tests/components/zha/test_siren.py
Comment thread tests/components/zha/test_siren.py
@puddly
puddly marked this pull request as ready for review May 27, 2026 14:54
Copilot AI review requested due to automatic review settings May 27, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/zha/device_action.py
Comment thread homeassistant/components/zha/device_action.py Outdated
Comment thread homeassistant/components/zha/device_action.py Outdated
Comment on lines 23 to 78
@@ -73,24 +65,18 @@
DEFAULT_ACTION_SCHEMA,
)

DEVICE_ACTIONS = {
CLUSTER_HANDLER_IAS_WD: [
# Maps a cluster_id the device must expose to the available actions.
DEVICE_ACTIONS_BY_CLUSTER_ID: dict[int, list[dict[str, str]]] = {
IasWd.cluster_id: [
{CONF_TYPE: ACTION_SQUAWK, CONF_DOMAIN: DOMAIN},
{CONF_TYPE: ACTION_WARN, CONF_DOMAIN: DOMAIN},
],
CLUSTER_HANDLER_INOVELLI: [
INOVELLI_CLUSTER_ID: [
{CONF_TYPE: INOVELLI_ALL_LED_EFFECT, CONF_DOMAIN: DOMAIN},
{CONF_TYPE: INOVELLI_INDIVIDUAL_LED_EFFECT, CONF_DOMAIN: DOMAIN},
],
}
Copilot AI review requested due to automatic review settings May 27, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/zha/helpers.py

@TheJulianJES TheJulianJES left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Everything still seems to work fine. Changes look good. The hassfest icon regeneratiron test failure is unrelated and also fails on dev

@frenck frenck modified the milestones: 2026.6.0b0, 2026.6.0 May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 16:10
@puddly

puddly commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

@frenck Can we get this PR into the beta as well? Or do you want it in b1? I just merged dev for the hassfest fix.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/zha/device_action.py Outdated
@frenck

frenck commented May 27, 2026

Copy link
Copy Markdown
Member

@frenck Can we get this PR into the beta as well? Or do you want it in b1? I just merged dev for the hassfest fix.

Sorry, didn't notice that one. B1, as B0 was not possible for me to wait any longer.

../Frenck

@frenck
frenck merged commit 8cbd358 into home-assistant:dev May 27, 2026
46 of 48 checks passed
@TheJulianJES TheJulianJES mentioned this pull request May 31, 2026
21 tasks
frenck pushed a commit that referenced this pull request Jun 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cherry-picked cla-signed dependency Pull requests marked as a dependency upgrade has-tests integration: zha Quality Scale: No score Top 50 Integration is ranked within the top 50 by usage Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants