Skip to content

Commit cbd4952

Browse files
AlvaroVegafgalan
andauthored
Update lib/services/devices/devices-NGSI-v2.js
Co-authored-by: Fermín Galán Márquez <[email protected]>
1 parent 05c18f6 commit cbd4952

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/services/devices/devices-NGSI-v2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ function createInitialEntityNgsi2(newDevice, deviceObj, callback) {
224224
callback(null, deviceObj);
225225
} else {
226226
// Creates initial entity when commands by sucriptions, to ensure commands appears in entity with null value
227+
// (including a check so if device has no commands, no entity is created)
227228
if (newDevice.commands.length > 0) {
228229
const options = {
229230
url: config.getConfig().contextBroker.url + '/v2/entities?options=upsert',

0 commit comments

Comments
 (0)