You might find the ideas in this thread helpful
The important part is using two Items -one to represent on/off state, one for control pulses.