@riddix/hamh 2.1.0-alpha.542 → 2.1.0-alpha.544
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
|
@@ -147777,7 +147777,10 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
147777
147777
|
suctionLevelEntity: config10.suctionLevelEntity,
|
|
147778
147778
|
mopIntensityEntity: config10.mopIntensityEntity,
|
|
147779
147779
|
valetudoIdentifier: config10.valetudoIdentifier,
|
|
147780
|
-
coverSwapOpenClose: config10.coverSwapOpenClose
|
|
147780
|
+
coverSwapOpenClose: config10.coverSwapOpenClose,
|
|
147781
|
+
customServiceAreas: config10.customServiceAreas,
|
|
147782
|
+
customFanSpeedTags: config10.customFanSpeedTags,
|
|
147783
|
+
composedEntities: config10.composedEntities
|
|
147781
147784
|
});
|
|
147782
147785
|
mappingsRestored++;
|
|
147783
147786
|
}
|
|
@@ -147916,7 +147919,13 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
147916
147919
|
powerEntity: config10.powerEntity,
|
|
147917
147920
|
energyEntity: config10.energyEntity,
|
|
147918
147921
|
suctionLevelEntity: config10.suctionLevelEntity,
|
|
147919
|
-
mopIntensityEntity: config10.mopIntensityEntity
|
|
147922
|
+
mopIntensityEntity: config10.mopIntensityEntity,
|
|
147923
|
+
temperatureEntity: config10.temperatureEntity,
|
|
147924
|
+
valetudoIdentifier: config10.valetudoIdentifier,
|
|
147925
|
+
coverSwapOpenClose: config10.coverSwapOpenClose,
|
|
147926
|
+
customServiceAreas: config10.customServiceAreas,
|
|
147927
|
+
customFanSpeedTags: config10.customFanSpeedTags,
|
|
147928
|
+
composedEntities: config10.composedEntities
|
|
147920
147929
|
});
|
|
147921
147930
|
mappingsRestored++;
|
|
147922
147931
|
}
|
|
@@ -175705,7 +175714,9 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175705
175714
|
}
|
|
175706
175715
|
}
|
|
175707
175716
|
/**
|
|
175708
|
-
* Safely update ServiceArea.currentArea.
|
|
175717
|
+
* Safely update ServiceArea.currentArea and progress.
|
|
175718
|
+
* When areaId is set, marks it as Operating in progress.
|
|
175719
|
+
* When areaId is null (Idle), marks all Operating/Pending as Completed.
|
|
175709
175720
|
* No-op if ServiceArea is not available on this endpoint.
|
|
175710
175721
|
*/
|
|
175711
175722
|
trySetCurrentArea(areaId) {
|
|
@@ -175715,9 +175726,32 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175715
175726
|
serviceArea.state.currentArea = areaId;
|
|
175716
175727
|
logger189.debug(`currentArea set to ${areaId}`);
|
|
175717
175728
|
}
|
|
175729
|
+
this.updateProgress(serviceArea, areaId);
|
|
175718
175730
|
} catch {
|
|
175719
175731
|
}
|
|
175720
175732
|
}
|
|
175733
|
+
/**
|
|
175734
|
+
* Update progress entries to reflect the current operating area.
|
|
175735
|
+
* - null: mark all Operating/Pending entries as Completed (cleaning done)
|
|
175736
|
+
* - areaId: mark that area as Operating
|
|
175737
|
+
*
|
|
175738
|
+
* Note: progress is available because our ServiceAreaServerBase enables
|
|
175739
|
+
* ProgressReporting, but the base ServiceAreaBehavior type doesn't expose it.
|
|
175740
|
+
*/
|
|
175741
|
+
updateProgress(serviceArea, areaId) {
|
|
175742
|
+
const state = serviceArea.state;
|
|
175743
|
+
const progress = state.progress;
|
|
175744
|
+
if (!progress || progress.length === 0) return;
|
|
175745
|
+
if (areaId === null) {
|
|
175746
|
+
state.progress = progress.map(
|
|
175747
|
+
(p) => p.status === ServiceArea3.OperationalStatus.Operating || p.status === ServiceArea3.OperationalStatus.Pending ? { ...p, status: ServiceArea3.OperationalStatus.Completed } : p
|
|
175748
|
+
);
|
|
175749
|
+
} else {
|
|
175750
|
+
state.progress = progress.map(
|
|
175751
|
+
(p) => p.areaId === areaId && p.status === ServiceArea3.OperationalStatus.Pending ? { ...p, status: ServiceArea3.OperationalStatus.Operating } : p
|
|
175752
|
+
);
|
|
175753
|
+
}
|
|
175754
|
+
}
|
|
175721
175755
|
/**
|
|
175722
175756
|
* Find the ServiceArea area ID that corresponds to a run mode value
|
|
175723
175757
|
* by matching the mode label to the area location name.
|
|
@@ -176002,7 +176036,10 @@ init_esm();
|
|
|
176002
176036
|
// src/matter/behaviors/service-area-server.ts
|
|
176003
176037
|
init_esm();
|
|
176004
176038
|
var logger190 = Logger.get("ServiceAreaServer");
|
|
176005
|
-
var
|
|
176039
|
+
var ServiceAreaWithProgress = ServiceAreaBehavior.with(
|
|
176040
|
+
ServiceArea3.Feature.ProgressReporting
|
|
176041
|
+
);
|
|
176042
|
+
var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
|
|
176006
176043
|
selectAreas(request) {
|
|
176007
176044
|
const { newAreas } = request;
|
|
176008
176045
|
logger190.info(
|
|
@@ -176021,6 +176058,10 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
|
|
|
176021
176058
|
};
|
|
176022
176059
|
}
|
|
176023
176060
|
this.state.selectedAreas = uniqueAreas;
|
|
176061
|
+
this.state.progress = uniqueAreas.map((areaId) => ({
|
|
176062
|
+
areaId,
|
|
176063
|
+
status: ServiceArea3.OperationalStatus.Pending
|
|
176064
|
+
}));
|
|
176024
176065
|
logger190.info(
|
|
176025
176066
|
`ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
|
|
176026
176067
|
);
|
|
@@ -176037,7 +176078,7 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
|
|
|
176037
176078
|
}
|
|
176038
176079
|
};
|
|
176039
176080
|
((ServiceAreaServerBase2) => {
|
|
176040
|
-
class State extends
|
|
176081
|
+
class State extends ServiceAreaWithProgress.State {
|
|
176041
176082
|
}
|
|
176042
176083
|
ServiceAreaServerBase2.State = State;
|
|
176043
176084
|
})(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
|
|
@@ -176048,11 +176089,15 @@ function ServiceAreaServer2(initialState) {
|
|
|
176048
176089
|
return ServiceAreaServerBase.set({
|
|
176049
176090
|
supportedAreas: initialState.supportedAreas,
|
|
176050
176091
|
selectedAreas: initialState.selectedAreas ?? [],
|
|
176051
|
-
currentArea: initialState.currentArea ?? null
|
|
176092
|
+
currentArea: initialState.currentArea ?? null,
|
|
176093
|
+
progress: []
|
|
176052
176094
|
});
|
|
176053
176095
|
}
|
|
176054
|
-
var
|
|
176055
|
-
|
|
176096
|
+
var ServiceAreaWithMapsAndProgress = ServiceAreaBehavior.with(
|
|
176097
|
+
ServiceArea3.Feature.Maps,
|
|
176098
|
+
ServiceArea3.Feature.ProgressReporting
|
|
176099
|
+
);
|
|
176100
|
+
var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress {
|
|
176056
176101
|
selectAreas(request) {
|
|
176057
176102
|
const { newAreas } = request;
|
|
176058
176103
|
logger190.info(
|
|
@@ -176071,6 +176116,10 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
|
|
|
176071
176116
|
};
|
|
176072
176117
|
}
|
|
176073
176118
|
this.state.selectedAreas = uniqueAreas;
|
|
176119
|
+
this.state.progress = uniqueAreas.map((areaId) => ({
|
|
176120
|
+
areaId,
|
|
176121
|
+
status: ServiceArea3.OperationalStatus.Pending
|
|
176122
|
+
}));
|
|
176074
176123
|
logger190.info(
|
|
176075
176124
|
`ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
|
|
176076
176125
|
);
|
|
@@ -176087,7 +176136,7 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
|
|
|
176087
176136
|
}
|
|
176088
176137
|
};
|
|
176089
176138
|
((ServiceAreaServerWithMapsBase2) => {
|
|
176090
|
-
class State extends
|
|
176139
|
+
class State extends ServiceAreaWithMapsAndProgress.State {
|
|
176091
176140
|
}
|
|
176092
176141
|
ServiceAreaServerWithMapsBase2.State = State;
|
|
176093
176142
|
})(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
|
|
@@ -176105,7 +176154,8 @@ function ServiceAreaServerWithMaps(initialState) {
|
|
|
176105
176154
|
supportedAreas: initialState.supportedAreas,
|
|
176106
176155
|
supportedMaps: initialState.supportedMaps,
|
|
176107
176156
|
selectedAreas: initialState.selectedAreas ?? [],
|
|
176108
|
-
currentArea: initialState.currentArea ?? null
|
|
176157
|
+
currentArea: initialState.currentArea ?? null,
|
|
176158
|
+
progress: []
|
|
176109
176159
|
});
|
|
176110
176160
|
}
|
|
176111
176161
|
|