We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c70329 commit 7af109cCopy full SHA for 7af109c
lib/modules/device/DeviceService.ts
@@ -30,6 +30,7 @@ import {
30
EventDeviceUpdateAfter,
31
EventDeviceUpdateBefore,
32
} from "./types/DeviceEvents";
33
+import _ from "lodash";
34
35
type MeasureName = { asset: string; device: string; type: string };
36
@@ -116,6 +117,11 @@ export class DeviceService extends DigitalTwinService {
116
117
)) {
118
device._source.metadata[metadataName] ||= null;
119
}
120
+ for (const [metadataName, metadataValue] of Object.entries(
121
+ deviceModel.device.defaultMetadata,
122
+ )) {
123
+ _.set(device._source.metadata, metadataName, metadataValue);
124
+ }
125
126
const refreshableCollections: Array<{
127
index: string;
0 commit comments