diff --git a/src/lib/bosch.ts b/src/lib/bosch.ts index 6f768693ea390..e4a79ade08266 100644 --- a/src/lib/bosch.ts +++ b/src/lib/bosch.ts @@ -3552,6 +3552,10 @@ export const boschThermostatExtend = { values: ["idle", "heat", "cool"], configure: {reporting: {min: "MIN", max: "MAX", change: null}}, }, + ctrlSeqeOfOper: { + values: ["cooling_only", "heating_only"], + configure: {reporting: {min: "MIN", max: "MAX", change: null}}, + }, }); const exposes: (Expose | DefinitionExposesFunction)[] = thermostat.exposes; diff --git a/src/lib/modernExtend.ts b/src/lib/modernExtend.ts index 9b611c6ee39aa..91b9891cece7a 100644 --- a/src/lib/modernExtend.ts +++ b/src/lib/modernExtend.ts @@ -3170,6 +3170,19 @@ export interface ThermostatArgs { temperatureSetpointHold?: true; temperatureSetpointHoldDuration?: true; endpoint?: string; + ctrlSeqeOfOper?: Omit< + ValuesWithModernExtendConfiguration< + Array< + | "cooling_only" + | "cooling_with_reheat" + | "heating_only" + | "heating_with_reheat" + | "cooling_and_heating_4-pipes" + | "cooling_and_heating_4-pipes_with_reheat" + > + >, + "fromZigbee" + >; } export function thermostat(args: ThermostatArgs): ModernExtend { @@ -3186,6 +3199,7 @@ export function thermostat(args: ThermostatArgs): ModernExtend { temperatureSetpointHold = false, temperatureSetpointHoldDuration = false, endpoint = undefined, + ctrlSeqeOfOper = undefined, } = args; const endpointNames = endpoint ? [endpoint] : undefined; @@ -3389,6 +3403,23 @@ export function thermostat(args: ThermostatArgs): ModernExtend { expose.withEndpoint(endpoint); } + if (ctrlSeqeOfOper) { + expose.withControlSequenceOfOperation(ctrlSeqeOfOper.values); + + if (!ctrlSeqeOfOper.toZigbee?.skip) { + toZigbee.push(tz.thermostat_control_sequence_of_operation); + } + + if (!ctrlSeqeOfOper.configure?.skip) { + configure.push( + setupConfigureForReporting("hvacThermostat", "ctrlSeqeOfOper", { + config: ctrlSeqeOfOper.configure?.reporting ?? repConfigChange0, + access: ctrlSeqeOfOper.configure?.access ?? ea.STATE_GET, + }), + ); + } + } + return {exposes, fromZigbee, toZigbee, configure, isModernExtend: true}; }