fix: auto-detect hybrid devices using API features#740
Merged
CFenner merged 2 commits intoopenviess:masterfrom Apr 16, 2026
Merged
fix: auto-detect hybrid devices using API features#740CFenner merged 2 commits intoopenviess:masterfrom
CFenner merged 2 commits intoopenviess:masterfrom
Conversation
Devices with both heating.burners and heating.compressors features (e.g. Vitocaldens 222-F with CU401B_S controller) are now detected as Hybrid instead of HeatPump or GazBoiler. Previously, Hybrid was only reachable via the manual heating_type config option in HA, which was removed in home-assistant/core#165649. The regex-based auto-detect matched CU401B as HeatPump, losing all burner entities. This adds a feature-based fallback: after regex/role matching picks GazBoiler or HeatPump, the API features are checked. If both burners and compressors exist, the device is upgraded to Hybrid. If the API call fails, the original detection is kept. Fixes home-assistant/core#168288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Hybrid devices like the Vitocaldens 222-F (controller
CU401B_S) are detected asHeatPumpbecauseCU401Bmatches the heat pump regex pattern. TheHybridclass was never in the auto-detect list — it was only reachable via the manualheating_type: hybridconfig option in Home Assistant, which was removed in home-assistant/core#165649.This causes all burner entities to disappear, since
HeatPumpdoesn't exposeheating.burners.*features — onlyHybrid(which inherits from bothGazBoilerandHeatPump) does.Solution
After regex/role matching picks
GazBoilerorHeatPump, the device's API features are fetched and checked. If bothheating.burnersandheating.compressorsfeatures exist, the device is upgraded toHybrid.This is a fallback — the existing regex matching is unchanged. If the feature fetch fails, the original detection is silently kept.
Why not full feature-based detection?
Non-heating device types (ventilation, radiator actuators, room sensors, gateways) don't have obvious feature-prefix signatures, so they still need regex/role matching. This approach is the smallest change that catches all hybrid devices — current and future — without maintaining a model name list.
Fixes home-assistant/core#168288