"Trigger: state" vs. "State Changed" nodes

i am trying to figure out what the difference between these nodes is and when to use which? I have used them interchangeably in some of my automations, so I am confused as to what the difference is. Anyone have any sites or examples that can guide me in the right direction.

Basically this:

One only sends info if you trigger it with some kind of message (top, current state node - thats why the trigger node preceeds it)

One sends every change for a monitored entity but wont send initial state.

Thanks for that explanation. I was actually looking at these two nodes.


They seem to both fire when the state changes on whatever entity i am monitoring and i see they have some different options within them, hence my question on when it is proper to use one vs. the other.

Ah sorry -
for that, trigger-state can trigger based on a bunch of complex things changing - like PREVIOUS state was, or a single specific property toggling. While State_Changes dumps everything everytime anything changes.

I’ve really only ever used trigger-state it when I need to know when a specific property of an entity (that is not the STATE) changes and admittedly I don’t probably use that feature of it enough.

For instance, in one of my flows I use a bunch of flow variables and eventually dump them to a sensor so I can see them in lovelace while Im debugging something… But I could use that sensor entity for something else and trigger on if one of those specific properties changes from true to false and ignore all of the other 10 or so properties I’ve added to that sensor over time.

1 Like

They both serve the same general purpose equivalent to a trigger in HA. Event state has a built in conditional for time. That requires the setting to be true for a certain time before firing.

The trigger state allows multiple condition but not time. Meaning send a message if the light is on but only if I’m not home and there is no motion in the yard. This will only update as the main entity updates it’s value. If a conditional changes it won’t output until the main entity is updated.

Edit all entities can now be added into a list. When used this way the conditional template will update with each entity.

image

6 Likes