@riddix/hamh 2.1.0-alpha.406 → 2.1.0-alpha.408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/backend/cli.js
CHANGED
|
@@ -167512,7 +167512,7 @@ function thermostatPreInitialize(self) {
|
|
|
167512
167512
|
if (self.features.autoMode) {
|
|
167513
167513
|
self.state.minSetpointDeadBand = self.state.minSetpointDeadBand ?? 0;
|
|
167514
167514
|
}
|
|
167515
|
-
self.state.controlSequenceOfOperation = self.features.cooling && self.features.heating ? Thermostat3.ControlSequenceOfOperation.CoolingAndHeating : self.features.
|
|
167515
|
+
self.state.controlSequenceOfOperation = self.features.cooling && self.features.heating && self.features.autoMode ? Thermostat3.ControlSequenceOfOperation.CoolingAndHeating : self.features.heating ? Thermostat3.ControlSequenceOfOperation.HeatingOnly : Thermostat3.ControlSequenceOfOperation.CoolingOnly;
|
|
167516
167516
|
}
|
|
167517
167517
|
async function thermostatPostInitialize(self) {
|
|
167518
167518
|
const homeAssistant = await self.agent.load(HomeAssistantEntityBehavior);
|
|
@@ -167590,6 +167590,8 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
167590
167590
|
logger164.debug(
|
|
167591
167591
|
`update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
|
|
167592
167592
|
);
|
|
167593
|
+
const controlSequence = config10.getControlSequence(entity.state, this.agent);
|
|
167594
|
+
this.internal.controlSequenceOfOperation = controlSequence;
|
|
167593
167595
|
applyPatchState(this.state, {
|
|
167594
167596
|
...this.features.heating ? {
|
|
167595
167597
|
minHeatSetpointLimit: minHeatLimit,
|
|
@@ -167604,10 +167606,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
167604
167606
|
absMaxCoolSetpointLimit: maxCoolLimit
|
|
167605
167607
|
} : {},
|
|
167606
167608
|
localTemperature,
|
|
167607
|
-
controlSequenceOfOperation:
|
|
167608
|
-
entity.state,
|
|
167609
|
-
this.agent
|
|
167610
|
-
),
|
|
167609
|
+
controlSequenceOfOperation: controlSequence,
|
|
167611
167610
|
thermostatRunningState: this.getRunningState(systemMode, runningMode),
|
|
167612
167611
|
systemMode,
|
|
167613
167612
|
// thermostatRunningMode: Only set for Auto mode. Matter.js's reactor handles
|
|
@@ -168097,7 +168096,22 @@ var config4 = {
|
|
|
168097
168096
|
(m) => m === ClimateHvacMode.heat || m === ClimateHvacMode.heat_cool || m === ClimateHvacMode.auto
|
|
168098
168097
|
);
|
|
168099
168098
|
if (hasCooling && hasHeating) {
|
|
168100
|
-
|
|
168099
|
+
const hasAutoMode = modes.includes(ClimateHvacMode.heat_cool) && (modes.includes(ClimateHvacMode.heat) || modes.includes(ClimateHvacMode.cool));
|
|
168100
|
+
if (hasAutoMode) {
|
|
168101
|
+
return Thermostat3.ControlSequenceOfOperation.CoolingAndHeating;
|
|
168102
|
+
}
|
|
168103
|
+
if (modes.includes(ClimateHvacMode.heat) && modes.includes(ClimateHvacMode.cool)) {
|
|
168104
|
+
return Thermostat3.ControlSequenceOfOperation.CoolingAndHeating;
|
|
168105
|
+
}
|
|
168106
|
+
const hvacMode = entity.state;
|
|
168107
|
+
if (hvacMode === ClimateHvacMode.cool) {
|
|
168108
|
+
return Thermostat3.ControlSequenceOfOperation.CoolingOnly;
|
|
168109
|
+
}
|
|
168110
|
+
if (hvacMode === ClimateHvacMode.heat) {
|
|
168111
|
+
return Thermostat3.ControlSequenceOfOperation.HeatingOnly;
|
|
168112
|
+
}
|
|
168113
|
+
const direction = getHeatCoolOnlyDirection(entity, agent);
|
|
168114
|
+
return direction === "cooling" ? Thermostat3.ControlSequenceOfOperation.CoolingOnly : Thermostat3.ControlSequenceOfOperation.HeatingOnly;
|
|
168101
168115
|
}
|
|
168102
168116
|
if (hasCooling) {
|
|
168103
168117
|
return Thermostat3.ControlSequenceOfOperation.CoolingOnly;
|