Trigger if multiple entity change state

Is there a method in templating to trigger if an entity changes state? No specific state just changes.

I tried state_changed(‘entity_id’) but this didn’t capture the entity change. I figured that may work since state_chanfed is an event. Looking through the docs I don’t see where you can just capture if the state changes. I’m trying to do this in templating so I can use it in the node red template node. I know node red has the trigger node but it only allows one and was seeing if I could minimize the amount of nodes I am using.

Are you referring to State Triggers in automations?

Fires when the state of any of given entities changes. If only entity_id is given trigger will fire for all state changes, even if only state attributes change.

Yes but is there a way to do that in templating. I need to use it in node red unless in node red I’m just stuck with using multiple event trigger nodes to account for multiple entities.

I was trying to minimize as always. If I can do it with templating I can just add that to a template node.

you can use substrings or regex to check with entity_id’s you want to monitor for state changes:

1 Like

How might I do that for input_boolean.*blind?

regex can help you there but I don’t know how to do it unfortunately but shouldn’t be too complicated. this website can help you maybe.

1 Like

Thanks. For the hell of it I selected regex and entered input_number.*blind and lo and behold it worked!

1 Like

That website helps immensely!
I also used it here: