Toggle switch act like a button?

Hi John,
I'm hoping you can help me. your code pulses on the on and off of the toggle switch, is there a way of only pulses for the on part?
(apologies for bringing an old post but i can't find a solution for what i'm after)