The toggle function is confusing. it's really sort of a "virtual toggle" because most switches in ST don't actually support toggling. they have discrete on and off commands. So what happens is the first time you press the button it send the on command, the next time it sends the off command, etc. If at some point the device gets turned off without using the button (maybe via alexa, or some other automation routine), then you push the button and it sends an off command although the switch was actually already off (therefore nothing happens). Then the next time you press it, it turns on. I handle all my toggles using a piston in smartthings which checks the state of the device and sends the proper on or off command based on the current state.