@riddix/hamh 2.1.0-alpha.511 → 2.1.0-alpha.512
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
|
@@ -170053,7 +170053,8 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
170053
170053
|
logger174.debug(
|
|
170054
170054
|
`update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
|
|
170055
170055
|
);
|
|
170056
|
-
|
|
170056
|
+
let controlSequence = config10.getControlSequence(entity.state, this.agent);
|
|
170057
|
+
controlSequence = this.clampControlSequence(controlSequence);
|
|
170057
170058
|
this.internal.controlSequenceOfOperation = controlSequence;
|
|
170058
170059
|
applyPatchState(this.state, {
|
|
170059
170060
|
...this.features.heating ? {
|
|
@@ -170308,6 +170309,26 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
170308
170309
|
}
|
|
170309
170310
|
}
|
|
170310
170311
|
}
|
|
170312
|
+
clampControlSequence(value) {
|
|
170313
|
+
const hasHeat = this.features.heating;
|
|
170314
|
+
const hasCool = this.features.cooling;
|
|
170315
|
+
const needsHeat = value === Thermostat3.ControlSequenceOfOperation.HeatingOnly || value === Thermostat3.ControlSequenceOfOperation.HeatingWithReheat;
|
|
170316
|
+
const needsCool = value === Thermostat3.ControlSequenceOfOperation.CoolingOnly || value === Thermostat3.ControlSequenceOfOperation.CoolingWithReheat;
|
|
170317
|
+
const needsBoth = value === Thermostat3.ControlSequenceOfOperation.CoolingAndHeating || value === Thermostat3.ControlSequenceOfOperation.CoolingAndHeatingWithReheat;
|
|
170318
|
+
if (needsHeat && !hasHeat) {
|
|
170319
|
+
return Thermostat3.ControlSequenceOfOperation.CoolingOnly;
|
|
170320
|
+
}
|
|
170321
|
+
if (needsCool && !hasCool) {
|
|
170322
|
+
return Thermostat3.ControlSequenceOfOperation.HeatingOnly;
|
|
170323
|
+
}
|
|
170324
|
+
if (needsBoth && !hasHeat) {
|
|
170325
|
+
return Thermostat3.ControlSequenceOfOperation.CoolingOnly;
|
|
170326
|
+
}
|
|
170327
|
+
if (needsBoth && !hasCool) {
|
|
170328
|
+
return Thermostat3.ControlSequenceOfOperation.HeatingOnly;
|
|
170329
|
+
}
|
|
170330
|
+
return value;
|
|
170331
|
+
}
|
|
170311
170332
|
clampSetpoint(value, min, max, type) {
|
|
170312
170333
|
const effectiveMin = min ?? 0;
|
|
170313
170334
|
const effectiveMax = max ?? 5e3;
|
|
@@ -170556,7 +170577,7 @@ var config4 = {
|
|
|
170556
170577
|
(m) => m === ClimateHvacMode.cool || m === ClimateHvacMode.heat_cool
|
|
170557
170578
|
);
|
|
170558
170579
|
const hasHeating = modes.some(
|
|
170559
|
-
(m) => m === ClimateHvacMode.heat || m === ClimateHvacMode.heat_cool
|
|
170580
|
+
(m) => m === ClimateHvacMode.heat || m === ClimateHvacMode.heat_cool
|
|
170560
170581
|
);
|
|
170561
170582
|
if (hasCooling && hasHeating) {
|
|
170562
170583
|
const hasAutoMode = modes.includes(ClimateHvacMode.heat_cool) && (modes.includes(ClimateHvacMode.heat) || modes.includes(ClimateHvacMode.cool));
|