@riddix/hamh 2.1.0-alpha.582 → 2.1.0-alpha.583
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
|
@@ -152931,6 +152931,7 @@ var EntityMappingStorage = class extends Service {
|
|
|
152931
152931
|
customName: request.customName?.trim() || void 0,
|
|
152932
152932
|
customProductName: request.customProductName?.trim() || void 0,
|
|
152933
152933
|
customVendorName: request.customVendorName?.trim() || void 0,
|
|
152934
|
+
customSerialNumber: request.customSerialNumber?.trim() || void 0,
|
|
152934
152935
|
disabled: request.disabled,
|
|
152935
152936
|
filterLifeEntity: request.filterLifeEntity?.trim() || void 0,
|
|
152936
152937
|
cleaningModeEntity: request.cleaningModeEntity?.trim() || void 0,
|
|
@@ -152953,7 +152954,7 @@ var EntityMappingStorage = class extends Service {
|
|
|
152953
152954
|
coverSwapOpenClose: request.coverSwapOpenClose || void 0,
|
|
152954
152955
|
composedEntities: request.composedEntities?.filter((e) => e.entityId?.trim()) ?? void 0
|
|
152955
152956
|
};
|
|
152956
|
-
if (!config10.matterDeviceType && !config10.customName && !config10.customProductName && !config10.customVendorName && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.temperatureEntity && !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.currentRoomEntity && !config10.valetudoIdentifier && !config10.coverSwapOpenClose && (!config10.composedEntities || config10.composedEntities.length === 0)) {
|
|
152957
|
+
if (!config10.matterDeviceType && !config10.customName && !config10.customProductName && !config10.customVendorName && !config10.customSerialNumber && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.temperatureEntity && !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.currentRoomEntity && !config10.valetudoIdentifier && !config10.coverSwapOpenClose && (!config10.composedEntities || config10.composedEntities.length === 0)) {
|
|
152957
152958
|
bridgeMap.delete(request.entityId);
|
|
152958
152959
|
} else {
|
|
152959
152960
|
bridgeMap.set(request.entityId, config10);
|
|
@@ -167911,10 +167912,7 @@ var BasicInformationServer2 = class extends BridgedDeviceBasicInformationServer
|
|
|
167911
167912
|
softwareVersionString: ellipse(64, device?.sw_version),
|
|
167912
167913
|
nodeLabel: ellipse(32, homeAssistant.state.customName) ?? ellipse(32, entity.state?.attributes?.friendly_name) ?? ellipse(32, entity.entity_id),
|
|
167913
167914
|
reachable: entity.state?.state != null && entity.state.state !== "unavailable",
|
|
167914
|
-
|
|
167915
|
-
// we're keeping it as the entity ID for now to avoid breaking existing
|
|
167916
|
-
// deployments.
|
|
167917
|
-
serialNumber: hash(32, entity.entity_id),
|
|
167915
|
+
serialNumber: ellipse(32, mapping?.customSerialNumber) ?? hash(32, entity.entity_id),
|
|
167918
167916
|
// UniqueId helps controllers (especially Alexa) identify devices across
|
|
167919
167917
|
// multiple fabric connections. Using MD5 hash of entity_id for stability.
|
|
167920
167918
|
uniqueId: crypto6.createHash("md5").update(entity.entity_id).digest("hex").substring(0, 32)
|