Advice for a flow in Node Red

Hi all,

Need some advice for a flow in Node red.

I want to achieve that a led strip beneath my tv cabinet goes ‘ON’ when the other light in the room go on and ‘OFF’ when the other lights in the room go off.

I have an automation for this in HA which worked perfectly, until it unexpectedly didn’t work anymore.
The ‘ON’ automation still works but the ‘OFF’ automation doesn’t work anymore and I can’t seem to find what causes this.
Now I’m trying to ‘rebuild’ this automation in Node Red, but can’t figure out which node to use for the trigger: ‘fourth button released after short press’ which used to trigger the action that put the led strip off.

This is the automation for the 'LED-strip ‘ON’:

And this is the automation for the 'LED-strip ‘OFF’:

I made this test-flow in Node Red:

with the same effect as the automation in HA: ‘ON’ works, but ‘OFF’ doesn’t work.

Could someone give me some advice on how to achieve a good flow with this?
I’m thinking the issue could be in the: ‘fourth button released after short press’-trigger which is configured in the HA-automation, but I can’t seem to find a suitable node for this.

Place the remote device in a device node. Connect that to a debug. In the debug node set it to complete message object. Connect it to the device. Press the button on the remote. In the debug message there should be an attribute that tells you which button was pressed.

From there you would use a switch node. The property would be the path to the button event.

Use the Events state node for the trigger. have a look at the looptimer node for turning the lights on and off