@riddix/hamh 2.1.0-alpha.504 → 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.
@@ -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,8 +175853,8 @@ 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");
175851
- function buildValetudoSegmentAction(vacuumEntityId, segmentIds) {
175852
- const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
175856
+ function buildValetudoSegmentAction(vacuumEntityId, segmentIds, valetudoIdentifier) {
175857
+ const identifier = valetudoIdentifier || vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
175853
175858
  const topic = `valetudo/${identifier}/MapSegmentationCapability/clean/set`;
175854
175859
  logger191.info(
175855
175860
  `Valetudo: mqtt.publish to ${topic}, segments: ${segmentIds.join(", ")}`
@@ -176029,7 +176034,11 @@ var vacuumRvcRunModeConfig = {
176029
176034
  const vacuumEntityId = homeAssistant.entityId;
176030
176035
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
176031
176036
  serviceArea.state.selectedAreas = [];
176032
- return buildValetudoSegmentAction(vacuumEntityId, selectedAreas);
176037
+ return buildValetudoSegmentAction(
176038
+ vacuumEntityId,
176039
+ selectedAreas,
176040
+ homeAssistant.state.mapping?.valetudoIdentifier
176041
+ );
176033
176042
  }
176034
176043
  const rooms = parseVacuumRooms(attributes7);
176035
176044
  const roomIds = [];
@@ -176155,7 +176164,11 @@ var vacuumRvcRunModeConfig = {
176155
176164
  const vacuumEntityId = entity.entity_id;
176156
176165
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
176157
176166
  const segmentId = getRoomIdFromMode(roomMode);
176158
- return buildValetudoSegmentAction(vacuumEntityId, [segmentId]);
176167
+ return buildValetudoSegmentAction(
176168
+ vacuumEntityId,
176169
+ [segmentId],
176170
+ homeAssistant.state.mapping?.valetudoIdentifier
176171
+ );
176159
176172
  }
176160
176173
  const rooms = parseVacuumRooms(attributes7);
176161
176174
  const numericIdFromMode = getRoomIdFromMode(roomMode);