From ff030f9e5e755c971949b3479bc7de2dd971e6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Wed, 26 Sep 2018 16:09:52 +0800 Subject: [PATCH] Update main.js --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 933cc25..3413bc5 100644 --- a/main.js +++ b/main.js @@ -471,13 +471,13 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects) let regs = options[regType]; for (let i = 0; regs.length > i; i++) { - const id = adapter.namespace + '.' + regs[i].id; + const id = adapter.namespace + '.' + regName + '.' + regs[i].deviceId; adapter.log.info("id=" + id); regs[i].fullId = id; objects[id] = { - _id: regs[i].id, + _id: id, type: 'state', common: { name: regs[i].description, @@ -495,7 +495,7 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects) }; tasks.push({ - id: regs[i].deviceId, + id: id, name: 'add', obj: objects[id] });