How to use the same button to turn the lights on/off in node red

Hi, I came across a one small problem. I want to turn on/off the the light system with the same button with node red, but I don’t know how. My idea is to use toggle button but don’t know how to read/keep last used state. So when the lights are off I want to turn them on, and turn them off if they were on. Feel free to help me LoL

Just grab an action node, set the action to light.toggle and put in your light entities.