@riddix/hamh 2.1.0-alpha.556 → 2.1.0-alpha.557
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
|
@@ -175898,7 +175898,6 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175898
175898
|
this.trySetCurrentArea(null);
|
|
175899
175899
|
this.completedAreas.clear();
|
|
175900
175900
|
this.lastCurrentArea = null;
|
|
175901
|
-
this.activeAreas = [];
|
|
175902
175901
|
} else if (newMode === 1 /* Cleaning */) {
|
|
175903
175902
|
if (this.activeAreas.length > 0 && this.lastCurrentArea === null) {
|
|
175904
175903
|
this.trySetCurrentArea(this.activeAreas[0]);
|
|
@@ -175923,7 +175922,8 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175923
175922
|
if (!roomState || !roomState.state) return;
|
|
175924
175923
|
if (this.activeAreas.length === 0) return;
|
|
175925
175924
|
const serviceArea = this.agent.get(ServiceAreaBehavior);
|
|
175926
|
-
const
|
|
175925
|
+
const sensorAttrs = roomState.attributes;
|
|
175926
|
+
const segmentId = sensorAttrs.segment_id ?? sensorAttrs.room_id;
|
|
175927
175927
|
const roomName = roomState.state;
|
|
175928
175928
|
let matchedAreaId = null;
|
|
175929
175929
|
if (segmentId != null) {
|
|
@@ -175939,7 +175939,12 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175939
175939
|
matchedAreaId = area.areaId;
|
|
175940
175940
|
}
|
|
175941
175941
|
}
|
|
175942
|
-
if (matchedAreaId === null)
|
|
175942
|
+
if (matchedAreaId === null) {
|
|
175943
|
+
logger189.debug(
|
|
175944
|
+
`currentRoom sensor: no match for "${roomName}" (segmentId=${segmentId}), activeAreas=[${this.activeAreas.join(", ")}]`
|
|
175945
|
+
);
|
|
175946
|
+
return;
|
|
175947
|
+
}
|
|
175943
175948
|
if (matchedAreaId === this.lastCurrentArea) return;
|
|
175944
175949
|
if (this.lastCurrentArea !== null) {
|
|
175945
175950
|
this.completedAreas.add(this.lastCurrentArea);
|
|
@@ -176063,6 +176068,9 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
176063
176068
|
}
|
|
176064
176069
|
case 0 /* Idle */:
|
|
176065
176070
|
this.trySetCurrentArea(null);
|
|
176071
|
+
this.completedAreas.clear();
|
|
176072
|
+
this.lastCurrentArea = null;
|
|
176073
|
+
this.activeAreas = [];
|
|
176066
176074
|
homeAssistant.callAction(
|
|
176067
176075
|
this.state.config.returnToBase(void 0, this.agent)
|
|
176068
176076
|
);
|
|
@@ -176684,7 +176692,8 @@ var vacuumRvcRunModeConfig = {
|
|
|
176684
176692
|
VacuumState.segment_cleaning,
|
|
176685
176693
|
VacuumState.zone_cleaning,
|
|
176686
176694
|
VacuumState.spot_cleaning,
|
|
176687
|
-
VacuumState.mop_cleaning
|
|
176695
|
+
VacuumState.mop_cleaning,
|
|
176696
|
+
VacuumState.paused
|
|
176688
176697
|
];
|
|
176689
176698
|
const isCleaning = cleaningStates.includes(state);
|
|
176690
176699
|
logger192.debug(
|
|
@@ -177974,7 +177983,7 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
|
|
|
177974
177983
|
if (isCharging(entity)) {
|
|
177975
177984
|
operationalState = RvcOperationalState3.OperationalState.Charging;
|
|
177976
177985
|
} else {
|
|
177977
|
-
operationalState = RvcOperationalState3.OperationalState.
|
|
177986
|
+
operationalState = RvcOperationalState3.OperationalState.Stopped;
|
|
177978
177987
|
}
|
|
177979
177988
|
} else if (state === VacuumState.error || state === "unavailable") {
|
|
177980
177989
|
operationalState = RvcOperationalState3.OperationalState.Error;
|
|
@@ -177985,8 +177994,8 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
|
|
|
177985
177994
|
);
|
|
177986
177995
|
operationalState = RvcOperationalState3.OperationalState.Running;
|
|
177987
177996
|
} else {
|
|
177988
|
-
logger196.info(`Unknown vacuum state "${state}", treating as
|
|
177989
|
-
operationalState = RvcOperationalState3.OperationalState.
|
|
177997
|
+
logger196.info(`Unknown vacuum state "${state}", treating as Stopped`);
|
|
177998
|
+
operationalState = RvcOperationalState3.OperationalState.Stopped;
|
|
177990
177999
|
}
|
|
177991
178000
|
}
|
|
177992
178001
|
logger196.debug(
|