Skip to content

Commit

Permalink
Merge pull request #640 from telefonicaid/task/propage_entity_name_ex…
Browse files Browse the repository at this point in the history
…p_type_information

Task/propage entity name exp and timestamp type information
  • Loading branch information
fgalan authored Oct 11, 2023
2 parents 1d1c088 + 74b742b commit ea9d8c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
- Fix: ensure service and subservice from device in logs about error proccesing message
- Fix: ensure service and subservice from device in logs about error proccesing message
- Fix: use but not store timestamp and entityNameExp from group with autoprovisioned devices (iotagent-node-lib#1504, partially)
- Fix: remove autocast (iota-node-lib#1501)

8 changes: 7 additions & 1 deletion lib/iotaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ function mergeDeviceWithConfiguration(deviceData, configuration, callback) {
if (configuration && configuration.explicitAttrs !== undefined && deviceData.explicitAttrs === undefined) {
deviceData.explicitAttrs = configuration.explicitAttrs;
}
if (configuration && configuration.entityNameExp !== undefined) {
deviceData.entityNameExp = configuration.entityNameExp;
}
if (configuration && configuration.timestamp !== undefined && deviceData.timestamp === undefined) {
deviceData.timestamp = configuration.timestamp;
}
config.getLogger().debug(context, 'deviceData after merge with conf: %j', deviceData);
callback(null, deviceData);
}
Expand Down Expand Up @@ -358,7 +364,7 @@ function createConfigurationNotification(results) {
configurations[results[i].name] = results[i].value;
}
} else {
for (var att in results) {
for (const att in results) {
configurations[att] = results[att].value;
}
}
Expand Down

0 comments on commit ea9d8c3

Please sign in to comment.