@riddix/hamh 2.1.0-alpha.503 → 2.1.0-alpha.505
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
|
@@ -147774,7 +147774,8 @@ WARNING: ${includeIdentity ? "This backup contains sensitive Matter identity dat
|
|
|
147774
147774
|
powerEntity: config10.powerEntity,
|
|
147775
147775
|
energyEntity: config10.energyEntity,
|
|
147776
147776
|
suctionLevelEntity: config10.suctionLevelEntity,
|
|
147777
|
-
mopIntensityEntity: config10.mopIntensityEntity
|
|
147777
|
+
mopIntensityEntity: config10.mopIntensityEntity,
|
|
147778
|
+
valetudoIdentifier: config10.valetudoIdentifier
|
|
147778
147779
|
});
|
|
147779
147780
|
mappingsRestored++;
|
|
147780
147781
|
}
|
|
@@ -148669,7 +148670,8 @@ function entityMappingApi(mappingStorage) {
|
|
|
148669
148670
|
suctionLevelEntity: body.suctionLevelEntity,
|
|
148670
148671
|
mopIntensityEntity: body.mopIntensityEntity,
|
|
148671
148672
|
customServiceAreas: body.customServiceAreas,
|
|
148672
|
-
customFanSpeedTags: body.customFanSpeedTags
|
|
148673
|
+
customFanSpeedTags: body.customFanSpeedTags,
|
|
148674
|
+
valetudoIdentifier: body.valetudoIdentifier
|
|
148673
148675
|
};
|
|
148674
148676
|
const config10 = await mappingStorage.setMapping(request);
|
|
148675
148677
|
res.status(200).json(config10);
|
|
@@ -149129,7 +149131,8 @@ function configToProfileEntry(config10) {
|
|
|
149129
149131
|
suctionLevelEntity: config10.suctionLevelEntity,
|
|
149130
149132
|
mopIntensityEntity: config10.mopIntensityEntity,
|
|
149131
149133
|
customServiceAreas: config10.customServiceAreas,
|
|
149132
|
-
customFanSpeedTags: config10.customFanSpeedTags
|
|
149134
|
+
customFanSpeedTags: config10.customFanSpeedTags,
|
|
149135
|
+
valetudoIdentifier: config10.valetudoIdentifier
|
|
149133
149136
|
};
|
|
149134
149137
|
}
|
|
149135
149138
|
function mappingProfileApi(mappingStorage) {
|
|
@@ -149247,7 +149250,8 @@ function mappingProfileApi(mappingStorage) {
|
|
|
149247
149250
|
suctionLevelEntity: entry.suctionLevelEntity,
|
|
149248
149251
|
mopIntensityEntity: entry.mopIntensityEntity,
|
|
149249
149252
|
customServiceAreas: entry.customServiceAreas,
|
|
149250
|
-
customFanSpeedTags: entry.customFanSpeedTags
|
|
149253
|
+
customFanSpeedTags: entry.customFanSpeedTags,
|
|
149254
|
+
valetudoIdentifier: entry.valetudoIdentifier
|
|
149251
149255
|
});
|
|
149252
149256
|
applied++;
|
|
149253
149257
|
} catch (e) {
|
|
@@ -152681,9 +152685,10 @@ var EntityMappingStorage = class extends Service {
|
|
|
152681
152685
|
customServiceAreas: request.customServiceAreas?.filter(
|
|
152682
152686
|
(a) => a.name?.trim() && a.service?.trim()
|
|
152683
152687
|
) ?? void 0,
|
|
152684
|
-
customFanSpeedTags: request.customFanSpeedTags && Object.keys(request.customFanSpeedTags).length > 0 ? request.customFanSpeedTags : void 0
|
|
152688
|
+
customFanSpeedTags: request.customFanSpeedTags && Object.keys(request.customFanSpeedTags).length > 0 ? request.customFanSpeedTags : void 0,
|
|
152689
|
+
valetudoIdentifier: request.valetudoIdentifier?.trim() || void 0
|
|
152685
152690
|
};
|
|
152686
|
-
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)) {
|
|
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) {
|
|
152687
152692
|
bridgeMap.delete(request.entityId);
|
|
152688
152693
|
} else {
|
|
152689
152694
|
bridgeMap.set(request.entityId, config10);
|
|
@@ -175848,6 +175853,26 @@ function createCleanAreaServiceAreaServer(cleanAreaRooms) {
|
|
|
175848
175853
|
|
|
175849
175854
|
// src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-run-mode-server.ts
|
|
175850
175855
|
var logger191 = Logger.get("VacuumRvcRunModeServer");
|
|
175856
|
+
function buildValetudoSegmentAction(vacuumEntityId, segmentIds, valetudoIdentifier) {
|
|
175857
|
+
const identifier = valetudoIdentifier || vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
|
|
175858
|
+
const topic = `valetudo/${identifier}/MapSegmentationCapability/clean/set`;
|
|
175859
|
+
logger191.info(
|
|
175860
|
+
`Valetudo: mqtt.publish to ${topic}, segments: ${segmentIds.join(", ")}`
|
|
175861
|
+
);
|
|
175862
|
+
return {
|
|
175863
|
+
action: "mqtt.publish",
|
|
175864
|
+
target: false,
|
|
175865
|
+
data: {
|
|
175866
|
+
topic,
|
|
175867
|
+
payload: JSON.stringify({
|
|
175868
|
+
action: "start_segment_action",
|
|
175869
|
+
segment_ids: segmentIds.map(String),
|
|
175870
|
+
iterations: 1,
|
|
175871
|
+
customOrder: true
|
|
175872
|
+
})
|
|
175873
|
+
}
|
|
175874
|
+
};
|
|
175875
|
+
}
|
|
175851
175876
|
function buildSupportedModes2(attributes7, includeUnnamedRooms = false, customAreas) {
|
|
175852
175877
|
const modes = [
|
|
175853
175878
|
{
|
|
@@ -176006,6 +176031,15 @@ var vacuumRvcRunModeConfig = {
|
|
|
176006
176031
|
};
|
|
176007
176032
|
}
|
|
176008
176033
|
}
|
|
176034
|
+
const vacuumEntityId = homeAssistant.entityId;
|
|
176035
|
+
if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
|
|
176036
|
+
serviceArea.state.selectedAreas = [];
|
|
176037
|
+
return buildValetudoSegmentAction(
|
|
176038
|
+
vacuumEntityId,
|
|
176039
|
+
selectedAreas,
|
|
176040
|
+
homeAssistant.state.mapping?.valetudoIdentifier
|
|
176041
|
+
);
|
|
176042
|
+
}
|
|
176009
176043
|
const rooms = parseVacuumRooms(attributes7);
|
|
176010
176044
|
const roomIds = [];
|
|
176011
176045
|
let targetMapName;
|
|
@@ -176023,25 +176057,6 @@ var vacuumRvcRunModeConfig = {
|
|
|
176023
176057
|
`Starting cleaning with selected areas: ${roomIds.join(", ")}`
|
|
176024
176058
|
);
|
|
176025
176059
|
serviceArea.state.selectedAreas = [];
|
|
176026
|
-
const vacuumEntityId = homeAssistant.entityId;
|
|
176027
|
-
if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
|
|
176028
|
-
const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
|
|
176029
|
-
logger191.info(
|
|
176030
|
-
`Valetudo vacuum: Using mqtt.publish segment_cleanup for rooms: ${roomIds.join(", ")}`
|
|
176031
|
-
);
|
|
176032
|
-
return {
|
|
176033
|
-
action: "mqtt.publish",
|
|
176034
|
-
target: false,
|
|
176035
|
-
data: {
|
|
176036
|
-
topic: `valetudo/${identifier}/MapSegmentationCapability/clean/set`,
|
|
176037
|
-
payload: JSON.stringify({
|
|
176038
|
-
segment_ids: roomIds.map(String),
|
|
176039
|
-
iterations: 1,
|
|
176040
|
-
customOrder: true
|
|
176041
|
-
})
|
|
176042
|
-
}
|
|
176043
|
-
};
|
|
176044
|
-
}
|
|
176045
176060
|
if (isDreameVacuum(attributes7)) {
|
|
176046
176061
|
if (targetMapName) {
|
|
176047
176062
|
const vacName = vacuumEntityId.replace("vacuum.", "");
|
|
@@ -176146,6 +176161,15 @@ var vacuumRvcRunModeConfig = {
|
|
|
176146
176161
|
};
|
|
176147
176162
|
}
|
|
176148
176163
|
}
|
|
176164
|
+
const vacuumEntityId = entity.entity_id;
|
|
176165
|
+
if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
|
|
176166
|
+
const segmentId = getRoomIdFromMode(roomMode);
|
|
176167
|
+
return buildValetudoSegmentAction(
|
|
176168
|
+
vacuumEntityId,
|
|
176169
|
+
[segmentId],
|
|
176170
|
+
homeAssistant.state.mapping?.valetudoIdentifier
|
|
176171
|
+
);
|
|
176172
|
+
}
|
|
176149
176173
|
const rooms = parseVacuumRooms(attributes7);
|
|
176150
176174
|
const numericIdFromMode = getRoomIdFromMode(roomMode);
|
|
176151
176175
|
logger191.info(
|
|
@@ -176154,25 +176178,6 @@ var vacuumRvcRunModeConfig = {
|
|
|
176154
176178
|
const room = rooms.find((r) => getRoomModeValue(r) === roomMode);
|
|
176155
176179
|
if (room) {
|
|
176156
176180
|
const commandId3 = room.originalId ?? room.id;
|
|
176157
|
-
const vacuumEntityId = entity.entity_id;
|
|
176158
|
-
if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
|
|
176159
|
-
const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
|
|
176160
|
-
logger191.info(
|
|
176161
|
-
`Valetudo vacuum: Using mqtt.publish segment_cleanup for room ${room.name} (id: ${commandId3})`
|
|
176162
|
-
);
|
|
176163
|
-
return {
|
|
176164
|
-
action: "mqtt.publish",
|
|
176165
|
-
target: false,
|
|
176166
|
-
data: {
|
|
176167
|
-
topic: `valetudo/${identifier}/MapSegmentationCapability/clean/set`,
|
|
176168
|
-
payload: JSON.stringify({
|
|
176169
|
-
segment_ids: [String(commandId3)],
|
|
176170
|
-
iterations: 1,
|
|
176171
|
-
customOrder: true
|
|
176172
|
-
})
|
|
176173
|
-
}
|
|
176174
|
-
};
|
|
176175
|
-
}
|
|
176176
176181
|
if (isDreameVacuum(attributes7)) {
|
|
176177
176182
|
if (room.mapName) {
|
|
176178
176183
|
const vacuumName = vacuumEntityId.replace("vacuum.", "");
|