Skip to content

Remove zigbee_switch assertion from test - #3069

Merged
J. Nick Koston (bdraco) merged 4 commits into
esphome:mainfrom
luar123:patch-1
Nov 20, 2026
Merged

J. Nick Koston (bdraco) merged 4 commits into
esphome:mainfrom
luar123:patch-1

Conversation

@luar123

@luar123 luar123 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What does this implement/fix?

Replace obsolete zigbee_* ids in gate test case and script/check_catalog.py with report.
esphome/esphome/pull/22482 removes the zigbee ids from the schema and this test fails.

Related issue or feature (if applicable):

  • fixes

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — docs
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Frontend coordination

  • No frontend change needed
  • Companion frontend PR: esphome/device-builder-frontend#

Checklist

  • The code change is tested and works locally.
  • Pre-commit hooks pass (ruff, codespell, yaml/json/python checks).
  • Tests have been added or updated under tests/ where applicable.
  • components.index.json / definitions/components/*.json have not been hand-edited (regenerate via script/sync_components.py if a sync is needed).
  • Architecture-level changes are reflected in docs/ARCHITECTURE.md and/or docs/API.md.

Remove assertion for zigbee_switch in test_sync_components_component_gates.
@github-actions github-actions Bot added the maintenance Maintenance / chores label Nov 14, 2026
@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 28 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing luar123:patch-1 (5bb05eb) with main (12e3fff)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@luar123

luar123 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

ESPHome Bot (@esphbot) review

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.77%. Comparing base (27b50f9) to head (5bb05eb).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3069   +/-   ##
=======================================
  Coverage   99.77%   99.77%           
=======================================
  Files         300      300           
  Lines       26564    26564           
=======================================
  Hits        26503    26503           
  Misses         61       61           
Flag Coverage Δ
py3.12 99.73% <ø> (ø)
py3.14 99.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@esphbot

Copy link
Copy Markdown
Contributor

❌ Permission denied. Only users with write access can trigger bot commands.

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.

🟡 Changes recommended

The catalog gating expectations still require the removed sensor.ct_clamp.zigbee_sensor field, causing the smoke check to fail when the upstream ESPHome version is synced.

1 open issue
What changed in this PR

Aligns Device Builder’s live-schema test with upstream ESPHome’s removal of Zigbee IDs from schemas.

Changes:

  • Removes the obsolete zigbee_switch gate assertion while retaining the MQTT and web-server checks.
File Description
tests/​test_sync_components_component_gates.py Removes the assertion for the deleted Zigbee schema field.

Review effort: Max

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.

🔵 Needs a closer look

Removing the assertion leaves the live-manifest test without a Zigbee gate check, allowing changes to the inherited Zigbee schema to pass unnoticed.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Restore the Zigbee gate assertion in the live-manifest test

tests/​test_sync_components_component_gates.py:211

Removing this assertion leaves the live-manifest test without a Zigbee gate check, so changes to the inherited Zigbee schema can pass unnoticed. Optional: replace it with assert gates.get(("report",)) == "zigbee"; upstream's existing report gate is unchanged by esphome/esphome#22482.

1 resolved since last review

Review effort: Max

@esphbot

ESPHome Bot (esphbot) commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Previous review — superseded by a newer review below.

@esphbot ESPHome Bot (esphbot) 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.

Tip

No blocking issues found — ready to merge.

@esphbot

Copy link
Copy Markdown
Contributor

PR Review — Remove zigbee_switch assertion from test

Merge-ready. This update fixes every point from the previous review.

What the PR does well:

  • The live-manifest test at tests/test_sync_components_component_gates.py:212 no longer drops the Zigbee check. It now asserts report → zigbee. That gate stays in upstream after [core][zigbee] move ids back into zigbee component esphome#22482, so the test still catches a regression in the inherited Zigbee gate.
  • In script/check_catalog.py, the _GATING_EXPECTATIONS entry and the comment block above it now use report and "zigbee entity options". The stale zigbee_sensor example is gone.
  • MQTT and web_server gate checks are unchanged.

Notes:

  • The zigbee_switch entry at tests/test_sync_components_component_gates.py:91 stays on purpose. It uses a made-up schema to test OnlyWith gate extraction and doesn't depend on the upstream schema.
  • script/sync_components.py:820-832 still lists the zigbee_* names in the advanced-field set. Those entries do no harm: once upstream drops these fields they just never match, and they still apply to older esphome versions. No change needed in this PR.
  • PR description: it would be worth saying in one line that the PR now also replaces the Zigbee assertions with report instead of only removing them.

✅ Resolved since last review (1)

Previously-flagged issues verified fixed
  • script/check_catalog.py:274 Comment still names the removed zigbee_sensor field


Checklist

  • No hardcoded secrets
  • Change matches PR description
  • Comments/docs consistent with code
  • Generated catalog files not hand-edited
  • Zigbee gate coverage preserved in live-manifest test

Automated review by Kōan (Claude) HEAD=5bb05eb 18s

@esphbot ESPHome Bot (esphbot) 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.

Tip

No blocking issues found — ready to merge.

@bdraco
J. Nick Koston (bdraco) merged commit c0d0110 into esphome:main Nov 20, 2026
26 checks passed
@luar123
luar123 deleted the patch-1 branch November 20, 2026 21:15
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

maintenance Maintenance / chores

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants