I’ve created a function that has two inputs. I would like the resulting payload (debug 12) to have one value, however, it seems to have two values or two separate messages. (I assume, one from each input payload).
I want the newMsg payload to be iCount - which should currently be 3.
When the door button is pushed, it sends a msg to Current time → Time Range → function 1. function 1 sets iCount to 0 and hits the first if statement which changes iCount to 1 and it is sent to debug.
But the door button also sends a msg to Is Dark → Is Dark (function node) → function 1. function 1 again sets iCount to 0 and hits the second if statement which changes iCount to 2 and it is sent to debug.
Not sure what you are trying to accomplish so I can’t tell you how to fix it. If you’re wanting to keep a running count, maybe a flow variable or a counter node.
My aim is to create a flow that will turn on one light when the door is opened and it’s dark, but if the door is opened between 23:30 and 08:00 (and it’s dark) it turns on several lights.