@riddix/hamh 2.1.0-alpha.576 → 2.1.0-alpha.577
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
|
@@ -175949,8 +175949,8 @@ function isRoomMode(mode) {
|
|
|
175949
175949
|
return mode >= ROOM_MODE_BASE;
|
|
175950
175950
|
}
|
|
175951
175951
|
var cleaningSessions = /* @__PURE__ */ new WeakMap();
|
|
175952
|
-
function getSession(
|
|
175953
|
-
let session = cleaningSessions.get(
|
|
175952
|
+
function getSession(endpoint) {
|
|
175953
|
+
let session = cleaningSessions.get(endpoint);
|
|
175954
175954
|
if (!session) {
|
|
175955
175955
|
session = {
|
|
175956
175956
|
completedAreas: /* @__PURE__ */ new Set(),
|
|
@@ -175958,7 +175958,7 @@ function getSession(agent) {
|
|
|
175958
175958
|
activeAreas: [],
|
|
175959
175959
|
loggedShortCircuits: /* @__PURE__ */ new Set()
|
|
175960
175960
|
};
|
|
175961
|
-
cleaningSessions.set(
|
|
175961
|
+
cleaningSessions.set(endpoint, session);
|
|
175962
175962
|
}
|
|
175963
175963
|
return session;
|
|
175964
175964
|
}
|
|
@@ -175973,7 +175973,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175973
175973
|
if (!entity.state || !entity.state.attributes) {
|
|
175974
175974
|
return;
|
|
175975
175975
|
}
|
|
175976
|
-
const s = getSession(this.
|
|
175976
|
+
const s = getSession(this.endpoint);
|
|
175977
175977
|
const previousMode = this.state.currentMode;
|
|
175978
175978
|
const newMode = this.state.config.getCurrentMode(entity.state, this.agent);
|
|
175979
175979
|
applyPatchState(
|
|
@@ -176009,7 +176009,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
176009
176009
|
* surfacing the silent paths that would otherwise be invisible.
|
|
176010
176010
|
*/
|
|
176011
176011
|
logShortCircuitOnce(reason, message) {
|
|
176012
|
-
const s = getSession(this.
|
|
176012
|
+
const s = getSession(this.endpoint);
|
|
176013
176013
|
if (s.loggedShortCircuits.has(reason)) return;
|
|
176014
176014
|
s.loggedShortCircuits.add(reason);
|
|
176015
176015
|
logger189.info(message);
|
|
@@ -176020,7 +176020,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
176020
176020
|
*/
|
|
176021
176021
|
updateCurrentRoomFromSensor() {
|
|
176022
176022
|
try {
|
|
176023
|
-
const s = getSession(this.
|
|
176023
|
+
const s = getSession(this.endpoint);
|
|
176024
176024
|
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
176025
176025
|
const currentRoomEntityId = homeAssistant.state.mapping?.currentRoomEntity;
|
|
176026
176026
|
if (!currentRoomEntityId) {
|
|
@@ -176121,7 +176121,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
176121
176121
|
* matter.js property getters during transaction pre-commit.
|
|
176122
176122
|
*/
|
|
176123
176123
|
updateProgress(serviceArea, areaId) {
|
|
176124
|
-
const s = getSession(this.
|
|
176124
|
+
const s = getSession(this.endpoint);
|
|
176125
176125
|
if (s.activeAreas.length === 0) return;
|
|
176126
176126
|
const state = serviceArea.state;
|
|
176127
176127
|
if (areaId === null) {
|
|
@@ -176154,7 +176154,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
176154
176154
|
}
|
|
176155
176155
|
}
|
|
176156
176156
|
changeToMode(request) {
|
|
176157
|
-
const s = getSession(this.
|
|
176157
|
+
const s = getSession(this.endpoint);
|
|
176158
176158
|
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
176159
176159
|
const { newMode } = request;
|
|
176160
176160
|
if (newMode !== this.state.currentMode && !this.state.supportedModes.some((m) => m.mode === newMode)) {
|