Node Red Start Timer Switch

i habe a switch on ha dashbord, when i turn on these switch, it woll turn on something, start a timer and after the timer, turn of and an turn the switch off.
How can i turn off the switch at the end and how can i make it visibel in node red the rest of the timer?