@riddix/hamh 2.1.0-alpha.449 → 2.1.0-alpha.450

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.
@@ -166536,6 +166536,7 @@ function buildEntityPayload(registry2, entityId) {
166536
166536
  }
166537
166537
  var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends Endpoint {
166538
166538
  entityId;
166539
+ mappedEntityIds;
166539
166540
  trackedEntityIds;
166540
166541
  lastStates = /* @__PURE__ */ new Map();
166541
166542
  debouncedFlush;
@@ -166619,11 +166620,13 @@ var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends End
166619
166620
  if (config10.temperatureEntityId)
166620
166621
  trackedEntityIds.push(config10.temperatureEntityId);
166621
166622
  if (config10.humidityEntityId) trackedEntityIds.push(config10.humidityEntityId);
166623
+ const mappedIds = trackedEntityIds.filter((id) => id !== primaryEntityId);
166622
166624
  const endpoint = new _ComposedAirPurifierEndpoint(
166623
166625
  parentTypeWithState,
166624
166626
  primaryEntityId,
166625
166627
  endpointId,
166626
- trackedEntityIds
166628
+ trackedEntityIds,
166629
+ mappedIds
166627
166630
  );
166628
166631
  const clusterLabels = [
166629
166632
  "AirPurifier",
@@ -166634,10 +166637,11 @@ var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends End
166634
166637
  logger160.info(`Created air purifier ${primaryEntityId}: ${clusterLabels}`);
166635
166638
  return endpoint;
166636
166639
  }
166637
- constructor(type, entityId, id, trackedEntityIds) {
166640
+ constructor(type, entityId, id, trackedEntityIds, mappedEntityIds) {
166638
166641
  super(type, { id });
166639
166642
  this.entityId = entityId;
166640
166643
  this.trackedEntityIds = trackedEntityIds;
166644
+ this.mappedEntityIds = mappedEntityIds;
166641
166645
  }
166642
166646
  async updateStates(states) {
166643
166647
  let anyChanged = false;
@@ -166847,6 +166851,7 @@ function buildEntityPayload2(registry2, entityId) {
166847
166851
  }
166848
166852
  var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
166849
166853
  entityId;
166854
+ mappedEntityIds;
166850
166855
  subEndpoints = /* @__PURE__ */ new Map();
166851
166856
  lastStates = /* @__PURE__ */ new Map();
166852
166857
  debouncedUpdates = /* @__PURE__ */ new Map();
@@ -166919,11 +166924,15 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
166919
166924
  mapping
166920
166925
  }
166921
166926
  });
166927
+ const mappedIds = [];
166928
+ if (config10.humidityEntityId) mappedIds.push(config10.humidityEntityId);
166929
+ if (config10.pressureEntityId) mappedIds.push(config10.pressureEntityId);
166922
166930
  const endpoint = new _ComposedSensorEndpoint(
166923
166931
  parentTypeWithState,
166924
166932
  primaryEntityId,
166925
166933
  endpointId,
166926
- parts
166934
+ parts,
166935
+ mappedIds
166927
166936
  );
166928
166937
  endpoint.subEndpoints.set(primaryEntityId, tempSub);
166929
166938
  if (config10.humidityEntityId && humSub) {
@@ -166937,9 +166946,10 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
166937
166946
  );
166938
166947
  return endpoint;
166939
166948
  }
166940
- constructor(type, entityId, id, parts) {
166949
+ constructor(type, entityId, id, parts, mappedEntityIds) {
166941
166950
  super(type, { id, parts });
166942
166951
  this.entityId = entityId;
166952
+ this.mappedEntityIds = mappedEntityIds;
166943
166953
  }
166944
166954
  async updateStates(states) {
166945
166955
  this.scheduleUpdate(this, this.entityId, states);