Use switch node to filter different devices

Hi,

I am using Node red and Hass.io and want to listen to events from Aqara click,
but i have more than 1 button (different entity_id) and each button can be press single, double....
image

1- What i need to set in the switch node to split per entity_id
2-What i need to set in the switch node to split per click_type

Tnx
Daniel.

Your debug shows msg.payload and your switch shows global.payload, which is different (if it starts with global or flow it’s a context value which you can read about in the docs)

Looking in more depth you actually want to switch based on an item in a nested object within msg.payload (and then in a nested nested object)

If you don’t understand javascript objects and arrays then reading one of the online tutorials is definitely time well spent.

There’s also a page in the docs that will help you get the right path to anything you can display in the debug panel

https://nodered.org/docs/user-guide/messages