Update main.js

This commit is contained in:
钟进 2018-09-26 14:34:35 +08:00
parent 0515efd157
commit 4ab4db9f2f

View File

@ -409,7 +409,7 @@ function parseConfig(callback) {
let tasks = []; let tasks = [];
checkObjects(adapter.config, 'door', 'door', 'Door', tasks, newObjects); checkObjects(adapter.config, 'door', 'door', 'Door', tasks, newObjects);
tasks.push({ tasks.push({
@ -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].deviceId; const id = adapter.namespace + '.' + regs[i].id;
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].deviceId, _id: regs[i].id,
type: 'state', type: 'state',
common: { common: {
name: regs[i].description, name: regs[i].description,