I forgot to introduce myself Hi all , i'm new with Node Red and JavaScript. i'm on a project with multi sensor in my home automation.
I would like to make averages for sensor values. I saw this topic which corresponds to my request: DS18B20 smoothing and PID tuning - #2 by Andrei
The Switch node separates the sensors on the different outputs thanks to the topic and payload of each sensor.
For my part, the message I receive is an object:
{" MeteoTemperature ": 32.5," meteoHumidity ": 75}
My question: in the Switch node how do I have to fill the contitions to direct my sensors?
[{"id":"4c6736d0.2f4a38","type":"switch","z":"fe2c7bc6.bd49c8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"payload.meteoTemperature","vt":"jsonata"},{"t":"cont","v":"meteoHumidity","vt":"str"},{"t":"cont","v":"meteoPressure","vt":"str"},{"t":"cont","v":"notUsed","vt":"str"},{"t":"cont","v":"voltage","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":358.57144927978516,"y":1865.714412689209,"wires":[["188a6136.b0778f"],,,,]},{"id":"188a6136.b0778f","type":"debug","z":"fe2c7bc6.bd49c8","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":513.5714149475098,"y":1842.7143421173096,"wires":},{"id":"852bed77.21c8f","type":"inject","z":"fe2c7bc6.bd49c8","name":"","topic":"","payload":"{"meteoTemperature":32.5,"meteoHumidity":75}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":212.85714721679688,"y":1867.1429471969604,"wires":[["4c6736d0.2f4a38"]]}]