diff --git a/src/nodes/gateway-subdevices/All.ejs b/src/nodes/gateway-subdevices/All.ejs index 837b61a..eaa2e71 100644 --- a/src/nodes/gateway-subdevices/All.ejs +++ b/src/nodes/gateway-subdevices/All.ejs @@ -3,7 +3,7 @@ category: 'xiaomi', color: '#3FADB5', defaults: { - gateway: {value:"", type:"<%= NODES_PREFIX %>-configurator"}, + gateway: {value:"", type:"<%= NODES_PREFIX %>-gateway configurator"}, name: {value: ""}, onlyModels: {value: []}, excludedSids: { value: []} @@ -35,11 +35,11 @@ onlyModels = getOnlyModelsValue(onlyModels || $('#node-input-onlyModels').val() || []); excludedSids = excludedSids || $('#node-input-excludedSids').val() || []; $('#node-input-excludedSids').empty(); - for (key in configNode.deviceList) { - var device = configNode.deviceList[key]; - if (onlyModels.length == 0 || onlyModels.indexOf(device.model) >= 0) { - var option = $(''); - if(excludedSids && excludedSids.indexOf(device.sid) >= 0) { + for (sid in configNode.deviceList) { + var device = configNode.deviceList[sid]; + if (onlyModels.length == 0 || onlyModels.indexOf(device.internalModel) >= 0) { + var option = $(''); + if(excludedSids && excludedSids.indexOf(sid) >= 0) { option.prop('selected', true); } $('#node-input-excludedSids').append(option); @@ -79,11 +79,11 @@