Can the trigger state node be used for or statements?

I have somewhat of an understanding of the Trigger State node. From what I can figure out is that if you have several contraints they all need to be satisfied before the allow is opened.

Is there a way to make it with an “or” condition?

For example, if my phone connects to wifi OR life360 shows me as home, mark me as home.

If you associate both wifi and life360 with a Person entity, it will set that Person as home when one of those entities is home I believe.

As @oembob mentioned, the person entity is probably the best option for this.

I used to use a complicated setup with functions that checked state of the trigger, and other entities to verify home/away. Now I just use a person node and it makes it so much simpler.

2 interesting points. One is I spent about 2 hours looking for your old post that gave me inspiration for this question. I remember you saying you had a flow you preferred. But times change.

Second point (let’s ignore the device tracker scenario) can the trigger node be used as an ‘or’ condition or would we just use a simple switch node connected to several trigger nodes?

you’ll need an and/or gate or collector


You could use a JSONata expression with an event state node.

$entities("").state = "home" or $entities("").state = "home"

I need to learn this jsonata one day.

1 Like

I need to learn this too!

I know this is an old thread, but I’m interested in this as well.

From my uni days, I recall that an OR gate can be constructed by inverting the inputs and using a NAND gate. So, I think you’ll get an OR function by reversing the various comparisons and using the Failed output for your message.