@evilbunny/node-red-contrib-zigbee2mqtt 3.2.11 → 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/nodes/server.js +4 -4
- package/package.json +1 -1
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 {
|