@riddix/hamh 2.1.0-alpha.709 → 2.1.0-alpha.710
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
|
@@ -125176,7 +125176,8 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
125176
125176
|
req.file.buffer
|
|
125177
125177
|
);
|
|
125178
125178
|
const existingIds = new Set(bridgeStorage.bridges.map((b) => b.id));
|
|
125179
|
-
const
|
|
125179
|
+
const bridgeIds = options.bridgeIds;
|
|
125180
|
+
const bridgesToRestore = bridgeIds ? backupData.bridges.filter((b) => bridgeIds.includes(b.id)) : backupData.bridges;
|
|
125180
125181
|
let bridgesRestored = 0;
|
|
125181
125182
|
let bridgesSkipped = 0;
|
|
125182
125183
|
let mappingsRestored = 0;
|
|
@@ -125220,6 +125221,7 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
125220
125221
|
coverSliderDebounceMs: config11.coverSliderDebounceMs,
|
|
125221
125222
|
disableClimateOnOff: config11.disableClimateOnOff,
|
|
125222
125223
|
disableClimateFanControl: config11.disableClimateFanControl,
|
|
125224
|
+
climateAutoMode: config11.climateAutoMode,
|
|
125223
125225
|
customServiceAreas: config11.customServiceAreas,
|
|
125224
125226
|
customFanSpeedTags: config11.customFanSpeedTags,
|
|
125225
125227
|
composedEntities: config11.composedEntities
|
|
@@ -125324,7 +125326,8 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
125324
125326
|
const options = req.body || {};
|
|
125325
125327
|
const { backupData, zipDirectory } = await extractBackupData(buffer);
|
|
125326
125328
|
const existingIds = new Set(bridgeStorage.bridges.map((b) => b.id));
|
|
125327
|
-
const
|
|
125329
|
+
const bridgeIds = options.bridgeIds;
|
|
125330
|
+
const bridgesToRestore = bridgeIds ? backupData.bridges.filter((b) => bridgeIds.includes(b.id)) : backupData.bridges;
|
|
125328
125331
|
let bridgesRestored = 0;
|
|
125329
125332
|
let bridgesSkipped = 0;
|
|
125330
125333
|
let mappingsRestored = 0;
|
|
@@ -125368,6 +125371,7 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
125368
125371
|
coverSliderDebounceMs: config11.coverSliderDebounceMs,
|
|
125369
125372
|
disableClimateOnOff: config11.disableClimateOnOff,
|
|
125370
125373
|
disableClimateFanControl: config11.disableClimateFanControl,
|
|
125374
|
+
climateAutoMode: config11.climateAutoMode,
|
|
125371
125375
|
customServiceAreas: config11.customServiceAreas,
|
|
125372
125376
|
customFanSpeedTags: config11.customFanSpeedTags,
|
|
125373
125377
|
composedEntities: config11.composedEntities
|
|
@@ -126211,6 +126215,7 @@ function entityMappingApi(mappingStorage) {
|
|
|
126211
126215
|
disableClimateFanControl: body.disableClimateFanControl,
|
|
126212
126216
|
climateKeepModeOnIdle: body.climateKeepModeOnIdle,
|
|
126213
126217
|
climateExposeFan: body.climateExposeFan,
|
|
126218
|
+
climateAutoMode: body.climateAutoMode,
|
|
126214
126219
|
composedEntities: body.composedEntities
|
|
126215
126220
|
};
|
|
126216
126221
|
const config11 = await mappingStorage.setMapping(request);
|
|
@@ -126678,7 +126683,8 @@ function configToProfileEntry(config11) {
|
|
|
126678
126683
|
disableClimateOnOff: config11.disableClimateOnOff,
|
|
126679
126684
|
disableClimateFanControl: config11.disableClimateFanControl,
|
|
126680
126685
|
climateKeepModeOnIdle: config11.climateKeepModeOnIdle,
|
|
126681
|
-
climateExposeFan: config11.climateExposeFan
|
|
126686
|
+
climateExposeFan: config11.climateExposeFan,
|
|
126687
|
+
climateAutoMode: config11.climateAutoMode
|
|
126682
126688
|
};
|
|
126683
126689
|
}
|
|
126684
126690
|
function mappingProfileApi(mappingStorage) {
|
|
@@ -126804,7 +126810,8 @@ function mappingProfileApi(mappingStorage) {
|
|
|
126804
126810
|
disableClimateOnOff: entry.disableClimateOnOff,
|
|
126805
126811
|
disableClimateFanControl: entry.disableClimateFanControl,
|
|
126806
126812
|
climateKeepModeOnIdle: entry.climateKeepModeOnIdle,
|
|
126807
|
-
climateExposeFan: entry.climateExposeFan
|
|
126813
|
+
climateExposeFan: entry.climateExposeFan,
|
|
126814
|
+
climateAutoMode: entry.climateAutoMode
|
|
126808
126815
|
});
|
|
126809
126816
|
applied++;
|
|
126810
126817
|
} catch (e) {
|
|
@@ -130741,9 +130748,10 @@ var EntityMappingStorage = class extends Service {
|
|
|
130741
130748
|
disableClimateFanControl: request.disableClimateFanControl || void 0,
|
|
130742
130749
|
climateKeepModeOnIdle: request.climateKeepModeOnIdle || void 0,
|
|
130743
130750
|
climateExposeFan: request.climateExposeFan || void 0,
|
|
130751
|
+
climateAutoMode: request.climateAutoMode || void 0,
|
|
130744
130752
|
composedEntities: request.composedEntities?.filter((e) => e.entityId?.trim()) ?? void 0
|
|
130745
130753
|
};
|
|
130746
|
-
if (!config11.matterDeviceType && !config11.customName && !config11.customProductName && !config11.customVendorName && !config11.customSerialNumber && config11.customVendorId === void 0 && config11.disabled !== true && !config11.filterLifeEntity && !config11.cleaningModeEntity && !config11.temperatureEntity && !config11.humidityEntity && !config11.batteryEntity && !config11.roomEntities && !config11.disableLockPin && !config11.powerEntity && !config11.energyEntity && !config11.pressureEntity && !config11.suctionLevelEntity && !config11.mopIntensityEntity && (!config11.customServiceAreas || config11.customServiceAreas.length === 0) && (!config11.customFanSpeedTags || Object.keys(config11.customFanSpeedTags).length === 0) && !config11.currentRoomEntity && !config11.valetudoIdentifier && !config11.coverSwapOpenClose && !config11.coverSliderDebounceMs && !config11.disableClimateOnOff && !config11.disableClimateFanControl && !config11.climateKeepModeOnIdle && !config11.climateExposeFan && (!config11.composedEntities || config11.composedEntities.length === 0)) {
|
|
130754
|
+
if (!config11.matterDeviceType && !config11.customName && !config11.customProductName && !config11.customVendorName && !config11.customSerialNumber && config11.customVendorId === void 0 && config11.disabled !== true && !config11.filterLifeEntity && !config11.cleaningModeEntity && !config11.temperatureEntity && !config11.humidityEntity && !config11.batteryEntity && !config11.roomEntities && !config11.disableLockPin && !config11.powerEntity && !config11.energyEntity && !config11.pressureEntity && !config11.suctionLevelEntity && !config11.mopIntensityEntity && (!config11.customServiceAreas || config11.customServiceAreas.length === 0) && (!config11.customFanSpeedTags || Object.keys(config11.customFanSpeedTags).length === 0) && !config11.currentRoomEntity && !config11.valetudoIdentifier && !config11.coverSwapOpenClose && !config11.coverSliderDebounceMs && !config11.disableClimateOnOff && !config11.disableClimateFanControl && !config11.climateKeepModeOnIdle && !config11.climateExposeFan && !config11.climateAutoMode && (!config11.composedEntities || config11.composedEntities.length === 0)) {
|
|
130747
130755
|
bridgeMap.delete(request.entityId);
|
|
130748
130756
|
} else {
|
|
130749
130757
|
bridgeMap.set(request.entityId, config11);
|
|
@@ -150795,6 +150803,15 @@ function getRunningModeFromHvacAction(entity) {
|
|
|
150795
150803
|
}
|
|
150796
150804
|
return hvacActionToRunningMode[action] ?? Thermostat3.ThermostatRunningMode.Off;
|
|
150797
150805
|
}
|
|
150806
|
+
function pinnedAutoSystemMode(override) {
|
|
150807
|
+
if (override === "cool") {
|
|
150808
|
+
return Thermostat3.SystemMode.Cool;
|
|
150809
|
+
}
|
|
150810
|
+
if (override === "heat") {
|
|
150811
|
+
return Thermostat3.SystemMode.Heat;
|
|
150812
|
+
}
|
|
150813
|
+
return void 0;
|
|
150814
|
+
}
|
|
150798
150815
|
var hvacModeToSystemMode = {
|
|
150799
150816
|
[ClimateHvacMode.heat]: Thermostat3.SystemMode.Heat,
|
|
150800
150817
|
[ClimateHvacMode.cool]: Thermostat3.SystemMode.Cool,
|
|
@@ -150848,6 +150865,16 @@ function computeSystemMode(entity, agent) {
|
|
|
150848
150865
|
}
|
|
150849
150866
|
const homeAssistant = agent.get(HomeAssistantEntityBehavior);
|
|
150850
150867
|
const entityId = homeAssistant.entityId;
|
|
150868
|
+
const pinnedMode = pinnedAutoSystemMode(
|
|
150869
|
+
homeAssistant.state.mapping?.climateAutoMode
|
|
150870
|
+
);
|
|
150871
|
+
if (pinnedMode != null) {
|
|
150872
|
+
lastHvacDirection.set(
|
|
150873
|
+
entityId,
|
|
150874
|
+
pinnedMode === Thermostat3.SystemMode.Cool ? "cooling" : "heating"
|
|
150875
|
+
);
|
|
150876
|
+
return pinnedMode;
|
|
150877
|
+
}
|
|
150851
150878
|
const action = attributes5(entity).hvac_action;
|
|
150852
150879
|
if (action === ClimateHvacAction.cooling) {
|
|
150853
150880
|
lastHvacDirection.set(entityId, "cooling");
|