Trigger Node-Red Flow if entity attribute changed

Hi there,

how can I trigger a Node-Red flow if an attribute of an sensor entity changed to a specific string?
I tried the trigger node and set the conditions for property with ‘new_state.attributes.game’. But this triggers erverytime when any attribute is changed.

image

Add a debug node to see what the attribute is. I would assume it’s just ‘game’.

The attribute is game. If the game changed the flow triggers as expacted. But it triggers also if some other attributes changed.

Place a filter node after the trigger node and have it set to block unless the value changes with the property set to msg.data.event.new_state.attributes.game

1 Like

This seems to work. Thank you!