AmyAmy / node-red-contrib-moving-average

A moving average node for Node-RED.
Do What The F*ck You Want To Public License
3 stars 2 forks source link

enhancement, not bug: second output #6

Closed svwhisper closed 3 years ago

svwhisper commented 3 years ago

I really struggle with how this is useful. How does one tell that the output is the result of a "get" rather than simply another input value to be averaged? I would like to request a second output be added and that output would then be used for the result of all commands. So output 1 is as today, emitting all values the node receives on input. Output 2 would emit the result of commands like "get".

What do you think?

AmyAmy commented 3 years ago

I see how this could be a useful addition, will look into it when I have some free time.

AmyAmy commented 3 years ago

Version 1.2.0 has now been published on NPM: https://www.npmjs.com/package/node-red-contrib-moving-average

The original payload is now returned as payload_in. This provides an additional method to determine what value was added or to differentiate between commands sent without duplicating the command to another property in the message object.