Trigger on attribute's event ONLY?

Hi there,
i’m struggling creating a nodered automation for severals cast devices.
My starting point si tu trigger a flow when the “media_player” entity’s attribute is changing from true to false, and false to true. But i don’t want to trigger when the entity’s state is changing (i.e. from playing to paused), any idea on how to achieve this?
I’ve tried “events: state node” and “trigger: state node” with no luck…

You can use a trigger state node. Notice the old and new state of the attribute.

Thank you, you lead me on the path…
for this is_volume_muted attribute, there’s the need to set property type to boolean… however this is what’s workig for me!
image

1 Like

Another way to do this is to use an events: all node. In the node, you’ll place information in the event data field to match against the resulting payload object.

I have some sensors that I created which have a state of either “Due”, “Overdue”, or “No.”

In the Events: all node, the data field looks like this:

{
    "old_state": {
        "state": "Overdue"
    },
    "new_state": {
        "state": "No"
    }
}

This information is nested under “events” in the payload object and it only allows messages through for which this matches.

1 Like