How do I stop a pulse action?

When using the pulse API, and setting it to run for a long period, e.g. 2 hours = 7,200 cycles, what is the best way to stop the pulse from completing the entire number of cycles?
I tried turning the light off (with API call), but after switching on again the pulse continued.
I did stop the pulse by changing the colour of the light, but was wondering if there is a better way.

A good method may be changing the brightness value, but I haven’t tested to see if this works.