Hello, I need to disable flow action when a certain input boolean is disabled. Here is my flow and where I want to interrupt it.
What is the common way to do this ?
Thanks
Hello, I need to disable flow action when a certain input boolean is disabled. Here is my flow and where I want to interrupt it.
What is the common way to do this ?
Thanks
There is 2 ways:
To play with flow variable (context), you need functions
To get a value from context:
var myBoolean = flow.get("myBoolean");
To set a value:
flow.set("myBoolean", true);
It is ok, it was my first proposal more or less, current_status + switch.
You inverted the two so you are not interrupting at the place you asked for but should work.
The only pitfall is that it is no longer triggered by a change in the sensor but with the injection of a timestamp, which is more consuming (pull instead of push).
yes more or less, I didn’t use your solution simply because I am not able to move sensor data to another part of the payload.
In your current state node configuration remove the lines in “output properties” section
then it should not change the payload at all but if your boolean is true pass the unmolested message on no message if its false.
What if I want the message passed unchanged if the boolean is false, E.G. for a vacation logic.