Raise ccm15 to silver quality scale#174945
Conversation
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>
There was a problem hiding this comment.
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.availablealso honor the coordinator'slast_update_success(viasuper().available) and declarePARALLEL_UPDATES = 0for the climate platform. - Mark the Silver rules
done/exemptinquality_scale.yaml, bumpmanifest.jsontosilver, add config-flow fielddata_description, and removeccm15from 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_modebranch, 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.
Proposed change
Promote the
ccm15integration from Bronze to Silver on theIntegration Quality Scale.
This implements the outstanding Silver rules and flips them to
doneinquality_scale.yaml, then sets"quality_scale": "silver"inmanifest.json:CCM15Climate.availablenow also consults thecoordinator's
last_update_success(viasuper().available). Previously itonly checked
self.data is not None; because the coordinator keeps the lastdata on a failed poll, the entity stayed "available" with stale state when the
controller went offline. It now correctly goes unavailable.
PARALLEL_UPDATES = 0for the climateplatform (writes and reads are funnelled through the coordinator).
DataUpdateCoordinator+UpdateFailedpattern already incoordinator.py; the# pragma: no coveron the
UpdateFailedpath is removed now that it is tested.failed poll, and cover the set-temperature
hvac_modebranch. Integrationcoverage is 97%.
(adds a
configuration_basicblock for the Host and Port fields).The remaining Silver rules were already
done/exempton Bronze(
config-entry-unloading,integration-owner,action-exceptions,docs-configuration-parameters,reauthentication-flow).python3 -m script.hassfestpasses.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: