add THERMOSTAT_FAN_ONLY_HVAC - #5093
Closed
vmvarga wants to merge 1 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #5093 +/- ##
=======================================
Coverage 93.07% 93.07%
=======================================
Files 401 401
Lines 13306 13307 +1
=======================================
+ Hits 12385 12386 +1
Misses 921 921 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Add
THERMOSTAT_FAN_ONLY_HVACexposed-feature quirk idSummary
Adds a new exposed-feature id,
THERMOSTAT_FAN_ONLY_HVAC, tozhaquirks/quirk_ids.py.It is a hint a quirk can place in
device.exposes_featuresto tell ZHA that thethermostat actually implements
SystemMode.Fan_only(0x07), so the climate entitymay expose
HVACMode.FAN_ONLY.It lives in the existing
# Exposed featuressection, next toSE_POLL_SUMMATIONand
SIREN_BASIC, and follows the same convention.Why
ZHA's
Thermostatclimate entity derives itshvac_modesfromcontrolSequenceOfOperation, which per the ZCL spec only covers heating/coolingcombinations and never includes
FAN_ONLY. EnablingFAN_ONLYpurely because adevice advertises the Fan Control cluster (0x0202) is unreliable: many devices
expose the cluster but silently ignore
SystemMode.Fan_only(e.g. some Tuya HVACthermostats).
The companion ZHA change therefore gates
HVACMode.FAN_ONLYbehind an explicitopt-in: the climate entity only exposes it when this feature id is present in
device.exposes_features. Per maintainer feedback on that PR, the feature id itselfbelongs here in
zha-quirks(where all other exposed-feature ids live and areimported from), not in the
zharepo.Companion PR
zigpy/zha— switches the climate entity tofrom zhaquirks.quirk_ids import THERMOSTAT_FAN_ONLY_HVACand bumps thezha-quirkspin to the release containing this change. That PR depends on thisone being merged and released first.
Usage
A device quirk declares support by exposing the feature, e.g. with the v2 quirk
builder:
A follow-up PR will add this opt-in to known-good fan-capable thermostats.
Test plan
THERMOSTAT_FAN_ONLY_HVACis importable:from zhaquirks.quirk_ids import THERMOSTAT_FAN_ONLY_HVAC"thermostat_fan_only_hvac"(matches the string ZHA previously used,so no behavioral change for any already-shipped quirk metadata)