climate-control
HVAC / climate control cap.
HVAC / climate control cap. Models the full surface of a HA climate.* entity (thermostat, A/C, heat pump, dehumidifier) with a single coherent slice — mode + fan + preset + target + dual-setpoint range + humidity + read-only current readings.
Operation modes (HvacMode) follow HA's canonical set; not every device supports every mode — the provider rejects unsupported values at runtime. Min/max/step bounds for the setpoint are surfaced via getOptions on the provider — they are static per-device hardware properties persisted in the device config blob.
fanMode / preset are free-form strings because device vendors use vastly different vocabularies (auto/low/high vs quiet/normal/turbo; eco/away/sleep vs home/night). The provider populates availableFanModes / availablePresets on the slice so the UI renders a closed-list picker.
Sub-surface gating paired with DeviceFeature flags:
ClimateDualSetpoint— heat_cool dual-target range supportClimateHumidity— currentHumidity / targetHumidity surfacesClimateFanMode— fan-mode selectorClimatePreset— preset selectorClimateSwingVertical— vertical louver swing toggleClimateSwingHorizontal— horizontal louver swing toggle
Swing is modelled as two INDEPENDENT booleans (vertical / horizontal), each actionable on its own and each gated by its own DeviceFeature so the UI shows only the axes a given device supports. This is generic — any climate device (not just Gree) can advertise either / both axes.
At a glance
| Capability | climate-control |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | climate |
| Source | packages/types/src/capabilities/climate-control.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
setMode | mutation | yes | protected |
setTarget | mutation | yes | protected |
setTargetRange | mutation | no | protected |
setTargetHumidity | mutation | no | protected |
setFanMode | mutation | no | protected |
setPreset | mutation | no | protected |
setSwingVertical | mutation | no | protected |
setSwingHorizontal | mutation | no | protected |
setMode
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
mode | "off" | "heat" | "cool" | "auto" | "heat_cool" | "fan_only" | "dry" | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.off | Climate off | mode = "off" |
climate.heat | Heat | mode = "heat" |
climate.cool | Cool | mode = "cool" |
climate.auto | Climate auto | mode = "auto" |
climate.mode | Set mode | mode = undefined |
setTarget
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
target | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.target | Set temperature | target = undefined |
setTargetRange
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
targetLow | number | yes | |
targetHigh | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.targetRange | Set temperature range | targetLow = undefined |
setTargetHumidity
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
targetHumidity | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.targetHumidity | Set humidity | targetHumidity = undefined |
setFanMode
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
fanMode | string | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.fanMode | Set fan mode | fanMode = undefined |
setPreset
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
preset | string | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.preset | Set preset | preset = undefined |
setSwingVertical
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.swingVerticalOn | Vertical swing on | swingVertical = true |
climate.swingVerticalOff | Vertical swing off | swingVertical = false |
setSwingHorizontal
mutation · optional for a provider
Input
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
climate.swingHorizontalOn | Horizontal swing on | swingHorizontal = true |
climate.swingHorizontalOff | Horizontal swing off | swingHorizontal = false |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Runtime-state slice — mirrored by the kernel. UI thermostats read the full slice via device.state.climate-control.value and refresh on every push without re-querying the provider.
| Field | Type | Required | Description |
|---|---|---|---|
mode | "off" | "heat" | "cool" | "auto" | "heat_cool" | "fan_only" | "dry" | yes | Active HVAC mode. |
action | "heating" | "cooling" | "drying" | "fan" | "idle" | "off" | null | no | What the device is doing now (heating while the valve is open, idle at setpoint). Absent or null = the device does not say; never a guess. |
availableModes | ("off" | "heat" | "cool" | "auto" | "heat_cool" | "fan_only" | "dry")[] | yes | Available HVAC modes the device accepts. Subset of HvacMode. |
fanMode | string | yes | Active fan mode (auto / low / medium / high / on / off / vendor-specific) — empty string when the device has no fan surface. |
availableFanModes | string[] | yes | Available fan modes the device accepts. |
preset | string | yes | Active preset (eco / away / sleep / vendor-specific) — empty string when no preset is active or the device has no preset surface. |
availablePresets | string[] | yes | Available presets the device accepts. |
target | number | null | yes | Single setpoint in Celsius. Used by single-target modes (heat / cool / dry). Null when the device is in a range mode (heat_cool) or has no setpoint at all (fan_only/off). |
targetHigh | number | null | yes | Upper bound of the dual setpoint in Celsius. Populated only in heat_cool mode. |
targetLow | number | null | yes | Lower bound of the dual setpoint in Celsius. Populated only in heat_cool mode. |
targetHumidity | number | null | yes | Target relative humidity (0..100). Null when the device has no humidity control. |
currentTemp | number | null | yes | Current measured temperature in Celsius. Read-only — pushed by the device's internal sensor. |
currentHumidity | number | null | yes | Current measured relative humidity (0..100). Read-only. |
swingVertical | boolean | null | yes | Vertical louver swing on/off. Null when the device has no vertical swing surface (gate with DeviceFeature.ClimateSwingVertical). |
swingHorizontal | boolean | null | yes | Horizontal louver swing on/off. Null when the device has no horizontal swing surface (gate with DeviceFeature.ClimateSwingHorizontal). |
minTemp | number | null | no | Lowest setpoint the device accepts, Celsius. Absent / null = not reported. |
maxTemp | number | null | no | Highest setpoint the device accepts, Celsius. Absent / null = not reported. |
tempStep | number | null | no | Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. |
lastActiveMode | "heat" | "cool" | "auto" | "heat_cool" | "fan_only" | "dry" | no | The last non-off mode the device reported. Kept by the device-state mirror on every write (providers never set it), so "turn on" can return to it. Absent until the device has reported a running mode. |
lastFetchedAt | number | yes | Ms epoch when the slice was last updated (push or command). |