Update main.js
This commit is contained in:
@@ -471,13 +471,13 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects)
|
|||||||
let regs = options[regType];
|
let regs = options[regType];
|
||||||
|
|
||||||
for (let i = 0; regs.length > i; i++) {
|
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);
|
adapter.log.info("id=" + id);
|
||||||
|
|
||||||
regs[i].fullId = id;
|
regs[i].fullId = id;
|
||||||
objects[id] = {
|
objects[id] = {
|
||||||
_id: regs[i].id,
|
_id: id,
|
||||||
type: 'state',
|
type: 'state',
|
||||||
common: {
|
common: {
|
||||||
name: regs[i].description,
|
name: regs[i].description,
|
||||||
@@ -495,7 +495,7 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects)
|
|||||||
};
|
};
|
||||||
|
|
||||||
tasks.push({
|
tasks.push({
|
||||||
id: regs[i].deviceId,
|
id: id,
|
||||||
name: 'add',
|
name: 'add',
|
||||||
obj: objects[id]
|
obj: objects[id]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user