Decision based on two states

I have two input booleans, away_mode and night_mode and I want to make a decision on these states when a flow is triggered. If either of the input booleans is on trigger Task 1, else trigger Task 2. Below is my current setup, is there a cleaner way to do this? Also I think Task 1 will be triggered twice if night mode and away mode are on, I may need to rethink this.

I would try to use this; I think you can do what you are asking, just be sure to allow for what happens as the modes switch back. https://flows.nodered.org/node/node-red-contrib-bool-gate

If anyone is curious, this is what I ended up with.

image

The join combines the output of the two current state nodes which is then passed into the function node with two outputs. Here is the code for the function node:

if(msg.payload["input_boolean.away_mode"] === "on" || msg.payload["input_boolean.night_mode"] === "on") {
    return [msg, null];
} else {
    return [null, msg];
}