Update main.js

This commit is contained in:
2018-09-26 16:09:52 +08:00
parent f636b5036b
commit ff030f9e5e

View File

@@ -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]
});