Skip to content

Raise ccm15 to silver quality scale#174945

Draft
ocalvo wants to merge 6 commits into
home-assistant:devfrom
ocalvo:ccm15-quality-scale-silver
Draft

Raise ccm15 to silver quality scale#174945
ocalvo wants to merge 6 commits into
home-assistant:devfrom
ocalvo:ccm15-quality-scale-silver

Conversation

@ocalvo

@ocalvo ocalvo commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Promote the ccm15 integration from Bronze to Silver on the
Integration Quality Scale.

This implements the outstanding Silver rules and flips them to done in
quality_scale.yaml, then sets "quality_scale": "silver" in manifest.json:

  • entity-unavailableCCM15Climate.available now also consults the
    coordinator's last_update_success (via super().available). Previously it
    only checked self.data is not None; because the coordinator keeps the last
    data on a failed poll, the entity stayed "available" with stale state when the
    controller went offline. It now correctly goes unavailable.
  • parallel-updates — declare PARALLEL_UPDATES = 0 for the climate
    platform (writes and reads are funnelled through the coordinator).
  • log-when-unavailable — satisfied by the DataUpdateCoordinator +
    UpdateFailed pattern already in coordinator.py; the # pragma: no cover
    on the UpdateFailed path is removed now that it is tested.
  • test-coverage — add a test asserting the entity becomes unavailable on a
    failed poll, and cover the set-temperature hvac_mode branch. Integration
    coverage is 97%.
  • docs-installation-parameters — covered by the companion docs PR below
    (adds a configuration_basic block for the Host and Port fields).

The remaining Silver rules were already done/exempt on Bronze
(config-entry-unloading, integration-owner, action-exceptions,
docs-configuration-parameters, reauthentication-flow).

python3 -m script.hassfest passes.

This PR is stacked on the Bronze adoption PR #173801; the Bronze commits will
drop out of the diff once that merges.

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

  • 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:

ocalvo and others added 6 commits June 18, 2026 11:31
The climate entity's available property only checks self.data is not
none, which the coordinator keeps on a failed poll, so the entity never
goes unavailable when the controller is offline. Track the Silver rule as
todo until available consults coordinator.last_update_success.
Implement the remaining Silver rules and mark the integration silver:

- entity-unavailable: have CCM15Climate.available also consult the
  coordinator's last_update_success so the entity goes unavailable when
  the controller cannot be reached, instead of showing stale state.
- parallel-updates: declare PARALLEL_UPDATES for the climate platform.
- log-when-unavailable: handled by the DataUpdateCoordinator; drop the
  pragma on the UpdateFailed path and cover it with a test.
- test-coverage: add a test asserting the entity becomes unavailable on a
  failed poll and exercise the set-temperature hvac_mode branch.
- docs-installation-parameters: documented in the companion docs PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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 PR promotes the ccm15 (Midea AC controller) integration from Bronze to Silver on the Home Assistant Integration Quality Scale. It is stacked on the Bronze adoption PR (#173801), so the combined diff also surfaces the Bronze-tier additions (the new quality_scale.yaml, strings.json data_description, and hassfest list removals).

The substantive Silver-tier code changes are small and well-targeted: the climate entity now correctly reports unavailable when the coordinator's last poll fails, the climate platform declares PARALLEL_UPDATES, a misleading copy-pasted docstring is corrected, a # pragma: no cover is dropped now that the failure path is tested, and tests are added/updated to cover both the unavailable path and the set-temperature hvac_mode branch.

Changes:

  • Make CCM15Climate.available also honor the coordinator's last_update_success (via super().available) and declare PARALLEL_UPDATES = 0 for the climate platform.
  • Mark the Silver rules done/exempt in quality_scale.yaml, bump manifest.json to silver, add config-flow field data_description, and remove ccm15 from the hassfest exclusion lists.
  • Add a test asserting the entity goes unavailable on a failed poll, extend the set-temperature test to exercise the hvac_mode branch, and remove the now-covered # pragma: no cover.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
homeassistant/components/ccm15/climate.py Adds PARALLEL_UPDATES = 0 and folds super().available into the availability check (entity-unavailable / parallel-updates rules).
homeassistant/components/ccm15/coordinator.py Fixes the copy-pasted "Rain Bird" docstring and removes the # pragma: no cover on the now-tested UpdateFailed path.
homeassistant/components/ccm15/quality_scale.yaml New quality-scale tracking file with Silver rules flipped to done/exempt.
homeassistant/components/ccm15/manifest.json Sets "quality_scale": "silver".
homeassistant/components/ccm15/strings.json Adds data_description for the host and port config-flow fields.
script/hassfest/quality_scale.py Removes ccm15 from INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE and INTEGRATIONS_WITHOUT_SCALE.
tests/components/ccm15/test_climate.py Adds an unavailable-on-failed-update test and extends the set-temperature test with hvac_mode.

I reviewed the changes and verified the key Silver rules against the actual integration code (availability now consults last_update_success, the UpdateFailed path is exercised by the new test, inject-websession/async-dependency hold, and the action-setup/action-exceptions exemptions match the established codebase convention of applying only to custom-registered actions). I did not find concrete code defects to comment on. Note that approval still depends on the unmerged Bronze PR (#173801) and the companion docs PR (marked "link to follow"), which back the docs-installation-parameters/docs-removal-instructions rules and cannot be verified from this diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants