Node red ZHA trigger - correct way of doing it?

Hi - I’ve got plenty of HA automations, but want to migrate over to node red as I find that has more scope. It’s also a little more reliable for time based triggers.

I have a load of zigbee (Aqara) sensors and buttons. I created an event listener for the ZHA event. I then have a switch for the ID of the device to see which sent the command.

Is this the correct way of doing it? I will be adding a lot more sensors in the coming weeks and would rather get it right from the beginning.

Thanks for any advice!

That is one way.
You can also use a function node if you find that easier. That means you code your way to get where the message should go.
That means you could condense the sequence to “blue nodes” (ZHA Event, and call services) and just the function node in between with multiple outputs.
It will make the sequence smaller, but depending on your preference perhaps harder to interpret/debug and follow.

You could also use more ZHA Event nodes.
That way you could split them better between lounge and Emily selector.

You could also use a device node for each button.

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/device.html