Differentiating between sensors using entity_id

I’ve got a couple of ewelink window sensors and several ewelink motion sensors. I want to send a state change when a window is opened, with a payload that tells which window is opened.

I’ve tried using an ‘events node’ with the entity field ‘binary_sensor.ewelink_[^ms01]’ as a regex (which excludes the motion sensors), but there’s no mechanism in the events node to pass the actual entity_id that triggers the state change. (I’ve considered using an events node for each sensor, but it seems a bit clumsy to me.)
The ‘trigger node’ looks like it might do the trick, as it appears that you can tailor the output with a custom payload, but I can’t see how to output the entity_id that caused the event in order that I can subsequently filter it.
I’d welcome any ideas, please.
Jim

For most of the event type nodes msg.topic will contain the entity id that triggered the event.

1 Like

Thanks ‘Kermit’ just the sort if info I needed.
Jim