@riddix/hamh 2.1.0-alpha.734 → 2.1.0-alpha.735
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
|
@@ -126800,6 +126800,7 @@ function entityMappingApi(mappingStorage) {
|
|
|
126800
126800
|
customFanSpeedTags: body.customFanSpeedTags,
|
|
126801
126801
|
currentRoomEntity: body.currentRoomEntity,
|
|
126802
126802
|
cleanedAreaEntity: body.cleanedAreaEntity,
|
|
126803
|
+
disableCustomAreaRoomModes: body.disableCustomAreaRoomModes,
|
|
126803
126804
|
valetudoIdentifier: body.valetudoIdentifier,
|
|
126804
126805
|
coverSwapOpenClose: body.coverSwapOpenClose,
|
|
126805
126806
|
coverSliderDebounceMs: body.coverSliderDebounceMs,
|
|
@@ -131420,6 +131421,7 @@ var EntityMappingStorage = class extends Service {
|
|
|
131420
131421
|
customFanSpeedTags: request.customFanSpeedTags && Object.keys(request.customFanSpeedTags).length > 0 ? request.customFanSpeedTags : void 0,
|
|
131421
131422
|
currentRoomEntity: request.currentRoomEntity?.trim() || void 0,
|
|
131422
131423
|
cleanedAreaEntity: request.cleanedAreaEntity?.trim() || void 0,
|
|
131424
|
+
disableCustomAreaRoomModes: request.disableCustomAreaRoomModes || void 0,
|
|
131423
131425
|
valetudoIdentifier: request.valetudoIdentifier?.trim() || void 0,
|
|
131424
131426
|
coverSwapOpenClose: request.coverSwapOpenClose || void 0,
|
|
131425
131427
|
coverSliderDebounceMs: sanitizeDebounceMs(request.coverSliderDebounceMs),
|
|
@@ -131430,7 +131432,7 @@ var EntityMappingStorage = class extends Service {
|
|
|
131430
131432
|
climateAutoMode: request.climateAutoMode || void 0,
|
|
131431
131433
|
composedEntities: request.composedEntities?.filter((e) => e.entityId?.trim()) ?? void 0
|
|
131432
131434
|
};
|
|
131433
|
-
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.cleanedAreaEntity && !config11.valetudoIdentifier && !config11.coverSwapOpenClose && !config11.coverSliderDebounceMs && !config11.disableClimateOnOff && !config11.disableClimateFanControl && !config11.climateKeepModeOnIdle && !config11.climateExposeFan && !config11.climateAutoMode && (!config11.composedEntities || config11.composedEntities.length === 0)) {
|
|
131435
|
+
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.cleanedAreaEntity && !config11.disableCustomAreaRoomModes && !config11.valetudoIdentifier && !config11.coverSwapOpenClose && !config11.coverSliderDebounceMs && !config11.disableClimateOnOff && !config11.disableClimateFanControl && !config11.climateKeepModeOnIdle && !config11.climateExposeFan && !config11.climateAutoMode && (!config11.composedEntities || config11.composedEntities.length === 0)) {
|
|
131434
131436
|
bridgeMap.delete(request.entityId);
|
|
131435
131437
|
} else {
|
|
131436
131438
|
bridgeMap.set(request.entityId, config11);
|
|
@@ -159128,7 +159130,7 @@ function buildValetudoSegmentAction(vacuumEntityId, segmentIds, valetudoIdentifi
|
|
|
159128
159130
|
}
|
|
159129
159131
|
};
|
|
159130
159132
|
}
|
|
159131
|
-
function buildSupportedModes2(attributes8, includeUnnamedRooms = false, customAreas) {
|
|
159133
|
+
function buildSupportedModes2(attributes8, includeUnnamedRooms = false, customAreas, disableRoomModes = false) {
|
|
159132
159134
|
const modes = [
|
|
159133
159135
|
{
|
|
159134
159136
|
label: "Idle",
|
|
@@ -159142,17 +159144,19 @@ function buildSupportedModes2(attributes8, includeUnnamedRooms = false, customAr
|
|
|
159142
159144
|
}
|
|
159143
159145
|
];
|
|
159144
159146
|
if (customAreas && customAreas.length > 0) {
|
|
159145
|
-
|
|
159146
|
-
|
|
159147
|
-
|
|
159148
|
-
|
|
159149
|
-
|
|
159150
|
-
|
|
159151
|
-
|
|
159152
|
-
|
|
159153
|
-
|
|
159154
|
-
|
|
159155
|
-
|
|
159147
|
+
if (!disableRoomModes) {
|
|
159148
|
+
const sorted = [...customAreas].sort(
|
|
159149
|
+
(a, b) => a.name.localeCompare(b.name)
|
|
159150
|
+
);
|
|
159151
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
159152
|
+
const modeValue = ROOM_MODE_BASE2 + i + 1;
|
|
159153
|
+
if (modeValue > 255) continue;
|
|
159154
|
+
modes.push({
|
|
159155
|
+
label: sorted[i].name,
|
|
159156
|
+
mode: modeValue,
|
|
159157
|
+
modeTags: [{ value: RvcRunMode3.ModeTag.Cleaning }]
|
|
159158
|
+
});
|
|
159159
|
+
}
|
|
159156
159160
|
}
|
|
159157
159161
|
} else {
|
|
159158
159162
|
const rooms = parseVacuumRooms(attributes8, includeUnnamedRooms);
|
|
@@ -159285,11 +159289,13 @@ var vacuumRvcRunModeConfig = {
|
|
|
159285
159289
|
},
|
|
159286
159290
|
getSupportedModes: (entity, agent) => {
|
|
159287
159291
|
const attributes8 = entity.attributes;
|
|
159288
|
-
const
|
|
159292
|
+
const mapping = agent.get(HomeAssistantEntityBehavior).state.mapping;
|
|
159293
|
+
const customAreas = mapping?.customServiceAreas;
|
|
159289
159294
|
return buildSupportedModes2(
|
|
159290
159295
|
attributes8,
|
|
159291
159296
|
false,
|
|
159292
|
-
customAreas && customAreas.length > 0 ? customAreas : void 0
|
|
159297
|
+
customAreas && customAreas.length > 0 ? customAreas : void 0,
|
|
159298
|
+
mapping?.disableCustomAreaRoomModes
|
|
159293
159299
|
);
|
|
159294
159300
|
},
|
|
159295
159301
|
// biome-ignore lint/suspicious/noConfusingVoidType: Required by ValueSetter<void> interface
|
|
@@ -159546,14 +159552,15 @@ var vacuumRvcRunModeConfig = {
|
|
|
159546
159552
|
return { action: "vacuum.start" };
|
|
159547
159553
|
}
|
|
159548
159554
|
};
|
|
159549
|
-
function createVacuumRvcRunModeServer(attributes8, includeUnnamedRooms = false, customAreas) {
|
|
159555
|
+
function createVacuumRvcRunModeServer(attributes8, includeUnnamedRooms = false, customAreas, disableRoomModes = false) {
|
|
159550
159556
|
const allRooms = parseVacuumRooms(attributes8, true);
|
|
159551
159557
|
const rooms = includeUnnamedRooms ? allRooms : parseVacuumRooms(attributes8, false);
|
|
159552
159558
|
const filteredCount = allRooms.length - rooms.length;
|
|
159553
159559
|
const supportedModes = buildSupportedModes2(
|
|
159554
159560
|
attributes8,
|
|
159555
159561
|
includeUnnamedRooms,
|
|
159556
|
-
customAreas
|
|
159562
|
+
customAreas,
|
|
159563
|
+
disableRoomModes
|
|
159557
159564
|
);
|
|
159558
159565
|
logger220.info(
|
|
159559
159566
|
`Creating VacuumRvcRunModeServer with ${rooms.length} rooms, ${supportedModes.length} total modes`
|
|
@@ -160606,7 +160613,8 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, cleaningModeOpt
|
|
|
160606
160613
|
cleanAreaRooms && cleanAreaRooms.length > 0 ? createCleanAreaRvcRunModeServer(cleanAreaRooms) : createVacuumRvcRunModeServer(
|
|
160607
160614
|
attributes8,
|
|
160608
160615
|
false,
|
|
160609
|
-
customAreas && customAreas.length > 0 ? customAreas : void 0
|
|
160616
|
+
customAreas && customAreas.length > 0 ? customAreas : void 0,
|
|
160617
|
+
homeAssistantEntity.mapping?.disableCustomAreaRoomModes
|
|
160610
160618
|
)
|
|
160611
160619
|
).set({ homeAssistantEntity });
|
|
160612
160620
|
if (includeOnOff) {
|
|
@@ -163799,7 +163807,8 @@ function ServerModeVacuumDevice(homeAssistantEntity, includeOnOff = false, clean
|
|
|
163799
163807
|
cleanAreaRooms && cleanAreaRooms.length > 0 ? createCleanAreaRvcRunModeServer(cleanAreaRooms) : createVacuumRvcRunModeServer(
|
|
163800
163808
|
attributes8,
|
|
163801
163809
|
false,
|
|
163802
|
-
customAreas && customAreas.length > 0 ? customAreas : void 0
|
|
163810
|
+
customAreas && customAreas.length > 0 ? customAreas : void 0,
|
|
163811
|
+
homeAssistantEntity.mapping?.disableCustomAreaRoomModes
|
|
163803
163812
|
)
|
|
163804
163813
|
).set({ homeAssistantEntity });
|
|
163805
163814
|
if (includeOnOff) {
|