Trigger:state with input always fires?

I recently found out the trigger:state can also have an input enabled. So I thought it would be a good idea to use it as a conditional check if various states are met within flows as a followup node.

I discovered the hard way (in a flow triggering an alarm) that trigger:state nodes always fire when their conditions are met, even if they are part of a flow with an input.

I was curious is there anyway to prevent it from triggering unless it gets triggered by the input in the flow? Or if there is another node that is better suited for conditional state checks.

Basically what I currently did (and backfired) is that if a door or windows opens there are various conditions are met to do a more localized lightbased flashing alarm. One of those conditions would be “Everyone is gone”. Which is a check against the entire households devices if they are set to ‘not_home’. “Everyone is gone” triggers when indeed everyone is “not_home”, not only when a door is first opened (and the toggle is on for this alarm to be used).

In the screenshot “Everyone is gone” is not connected anymore to the alarm else it would go off everytime nobody is home, regardless of the ‘shed’ or ‘gate’ being opened. So now it’s non-functional.

No, the input is only for testing and enabling/disabling the node.

You can use a current state and check if zone.home

The state of a zone is a number, which represends the number of persons that are currently in a zone.

1 Like

I feared it may be something like that :slight_smile: Going to go for the way easier approach you suggested bellow (thank you!). And think of different solutions for 2 other flows I was working on hoping to use the same node for different combinations of devices.