@riddix/hamh 2.1.0-alpha.510 → 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
|
@@ -147775,7 +147775,8 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
147775
147775
|
energyEntity: config10.energyEntity,
|
|
147776
147776
|
suctionLevelEntity: config10.suctionLevelEntity,
|
|
147777
147777
|
mopIntensityEntity: config10.mopIntensityEntity,
|
|
147778
|
-
valetudoIdentifier: config10.valetudoIdentifier
|
|
147778
|
+
valetudoIdentifier: config10.valetudoIdentifier,
|
|
147779
|
+
coverSwapOpenClose: config10.coverSwapOpenClose
|
|
147779
147780
|
});
|
|
147780
147781
|
mappingsRestored++;
|
|
147781
147782
|
}
|
|
@@ -148671,7 +148672,8 @@ function entityMappingApi(mappingStorage) {
|
|
|
148671
148672
|
mopIntensityEntity: body.mopIntensityEntity,
|
|
148672
148673
|
customServiceAreas: body.customServiceAreas,
|
|
148673
148674
|
customFanSpeedTags: body.customFanSpeedTags,
|
|
148674
|
-
valetudoIdentifier: body.valetudoIdentifier
|
|
148675
|
+
valetudoIdentifier: body.valetudoIdentifier,
|
|
148676
|
+
coverSwapOpenClose: body.coverSwapOpenClose
|
|
148675
148677
|
};
|
|
148676
148678
|
const config10 = await mappingStorage.setMapping(request);
|
|
148677
148679
|
res.status(200).json(config10);
|
|
@@ -149132,7 +149134,8 @@ function configToProfileEntry(config10) {
|
|
|
149132
149134
|
mopIntensityEntity: config10.mopIntensityEntity,
|
|
149133
149135
|
customServiceAreas: config10.customServiceAreas,
|
|
149134
149136
|
customFanSpeedTags: config10.customFanSpeedTags,
|
|
149135
|
-
valetudoIdentifier: config10.valetudoIdentifier
|
|
149137
|
+
valetudoIdentifier: config10.valetudoIdentifier,
|
|
149138
|
+
coverSwapOpenClose: config10.coverSwapOpenClose
|
|
149136
149139
|
};
|
|
149137
149140
|
}
|
|
149138
149141
|
function mappingProfileApi(mappingStorage) {
|
|
@@ -149251,7 +149254,8 @@ function mappingProfileApi(mappingStorage) {
|
|
|
149251
149254
|
mopIntensityEntity: entry.mopIntensityEntity,
|
|
149252
149255
|
customServiceAreas: entry.customServiceAreas,
|
|
149253
149256
|
customFanSpeedTags: entry.customFanSpeedTags,
|
|
149254
|
-
valetudoIdentifier: entry.valetudoIdentifier
|
|
149257
|
+
valetudoIdentifier: entry.valetudoIdentifier,
|
|
149258
|
+
coverSwapOpenClose: entry.coverSwapOpenClose
|
|
149255
149259
|
});
|
|
149256
149260
|
applied++;
|
|
149257
149261
|
} catch (e) {
|
|
@@ -152686,9 +152690,10 @@ var EntityMappingStorage = class extends Service {
|
|
|
152686
152690
|
(a) => a.name?.trim() && a.service?.trim()
|
|
152687
152691
|
) ?? void 0,
|
|
152688
152692
|
customFanSpeedTags: request.customFanSpeedTags && Object.keys(request.customFanSpeedTags).length > 0 ? request.customFanSpeedTags : void 0,
|
|
152689
|
-
valetudoIdentifier: request.valetudoIdentifier?.trim() || void 0
|
|
152693
|
+
valetudoIdentifier: request.valetudoIdentifier?.trim() || void 0,
|
|
152694
|
+
coverSwapOpenClose: request.coverSwapOpenClose || void 0
|
|
152690
152695
|
};
|
|
152691
|
-
if (!config10.matterDeviceType && !config10.customName && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.humidityEntity && !config10.batteryEntity && !config10.roomEntities && !config10.disableLockPin && !config10.powerEntity && !config10.energyEntity && !config10.pressureEntity && !config10.suctionLevelEntity && !config10.mopIntensityEntity && (!config10.customServiceAreas || config10.customServiceAreas.length === 0) && (!config10.customFanSpeedTags || Object.keys(config10.customFanSpeedTags).length === 0) && !config10.valetudoIdentifier) {
|
|
152696
|
+
if (!config10.matterDeviceType && !config10.customName && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.humidityEntity && !config10.batteryEntity && !config10.roomEntities && !config10.disableLockPin && !config10.powerEntity && !config10.energyEntity && !config10.pressureEntity && !config10.suctionLevelEntity && !config10.mopIntensityEntity && (!config10.customServiceAreas || config10.customServiceAreas.length === 0) && (!config10.customFanSpeedTags || Object.keys(config10.customFanSpeedTags).length === 0) && !config10.valetudoIdentifier && !config10.coverSwapOpenClose) {
|
|
152692
152697
|
bridgeMap.delete(request.entityId);
|
|
152693
152698
|
} else {
|
|
152694
152699
|
bridgeMap.set(request.entityId, config10);
|
|
@@ -170048,7 +170053,8 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
170048
170053
|
logger174.debug(
|
|
170049
170054
|
`update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
|
|
170050
170055
|
);
|
|
170051
|
-
|
|
170056
|
+
let controlSequence = config10.getControlSequence(entity.state, this.agent);
|
|
170057
|
+
controlSequence = this.clampControlSequence(controlSequence);
|
|
170052
170058
|
this.internal.controlSequenceOfOperation = controlSequence;
|
|
170053
170059
|
applyPatchState(this.state, {
|
|
170054
170060
|
...this.features.heating ? {
|
|
@@ -170303,6 +170309,26 @@ var ThermostatServerBase = class extends FullFeaturedBase {
|
|
|
170303
170309
|
}
|
|
170304
170310
|
}
|
|
170305
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
|
+
}
|
|
170306
170332
|
clampSetpoint(value, min, max, type) {
|
|
170307
170333
|
const effectiveMin = min ?? 0;
|
|
170308
170334
|
const effectiveMax = max ?? 5e3;
|
|
@@ -170551,7 +170577,7 @@ var config4 = {
|
|
|
170551
170577
|
(m) => m === ClimateHvacMode.cool || m === ClimateHvacMode.heat_cool
|
|
170552
170578
|
);
|
|
170553
170579
|
const hasHeating = modes.some(
|
|
170554
|
-
(m) => m === ClimateHvacMode.heat || m === ClimateHvacMode.heat_cool
|
|
170580
|
+
(m) => m === ClimateHvacMode.heat || m === ClimateHvacMode.heat_cool
|
|
170555
170581
|
);
|
|
170556
170582
|
if (hasCooling && hasHeating) {
|
|
170557
170583
|
const hasAutoMode = modes.includes(ClimateHvacMode.heat_cool) && (modes.includes(ClimateHvacMode.heat) || modes.includes(ClimateHvacMode.cool));
|
|
@@ -171114,6 +171140,9 @@ var adjustPositionForWriting2 = (position, agent) => {
|
|
|
171114
171140
|
return adjustPositionForWriting(position, featureFlags, matterSem);
|
|
171115
171141
|
};
|
|
171116
171142
|
var shouldSwapOpenClose = (agent) => {
|
|
171143
|
+
const homeAssistant = agent.get(HomeAssistantEntityBehavior);
|
|
171144
|
+
const entitySwap = homeAssistant.state.mapping?.coverSwapOpenClose;
|
|
171145
|
+
if (entitySwap !== void 0) return entitySwap;
|
|
171117
171146
|
const { featureFlags } = agent.env.get(BridgeDataProvider);
|
|
171118
171147
|
return featureFlags?.coverSwapOpenClose === true;
|
|
171119
171148
|
};
|