@evilbunny/node-red-contrib-zigbee2mqtt 3.2.10 → 3.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.html +1 -1
- package/api.js +1 -1
- package/nodes/server.js +4 -4
- package/package.json +1 -1
package/api.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// it exists only so the runtime side (api.js) can register its httpAdmin
|
|
7
7
|
// routes as a normal, parseable node module.
|
|
8
8
|
RED.nodes.registerType('zigbee2mqtt-eb-api', {
|
|
9
|
-
category: '',
|
|
9
|
+
category: 'config',
|
|
10
10
|
defaults: {},
|
|
11
11
|
label: function () { return 'zigbee2mqtt-eb-api'; }
|
|
12
12
|
});
|
package/api.js
CHANGED
|
@@ -171,6 +171,6 @@ module.exports = function(RED) {
|
|
|
171
171
|
RED.nodes.createNode(this, config);
|
|
172
172
|
}
|
|
173
173
|
RED.nodes.registerType('zigbee2mqtt-eb-api', Zigbee2mqttApiNode, {
|
|
174
|
-
category: '' //
|
|
174
|
+
category: 'config' // config-type nodes are automatically excluded from the palette
|
|
175
175
|
});
|
|
176
176
|
}
|
package/nodes/server.js
CHANGED
|
@@ -499,12 +499,12 @@ module.exports = function(RED) {
|
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
+
// always output an object keyed by property name, even for a single
|
|
503
|
+
// selected property, so payload.<property> works consistently regardless of count
|
|
504
|
+
payload = collected;
|
|
502
505
|
if (stateList.length === 1) {
|
|
503
|
-
|
|
504
|
-
payload = text = collected[stateList[0]];
|
|
506
|
+
text = collected[stateList[0]];
|
|
505
507
|
} else {
|
|
506
|
-
// multiple selected properties: output an object containing just those keys
|
|
507
|
-
payload = collected;
|
|
508
508
|
useProperty = null; // unit-suffix below only makes sense for a single property
|
|
509
509
|
}
|
|
510
510
|
} else {
|