Configuration Midi

I have problems to set my midi controller right. Want to use it to switch on off effects. So tried the learn function in Midi to bypass an effect via widget. This works great. But I’d like to sync the signal so I turn on the sync button in GP. When I turn the effect on and off in GP UI it works great. But when I push the midi switch I have to push twice. Tried a lot of settings but could not figure it out what the problem is. Maybe sombody can help me. Thanks!

Did you enable latch in the widget settings?
Can you upload a small gig where this issue occurs?

At the moment I can not upload a gig. Where can I enable latch. Midi controller works great to turn the effect on and off. The problem have to be the sync.

Latch is a setting when you edit a widget.
This is useful when you want to use a sustain pedal and each press should toggle a widget

Weird. I could solve the problem. I used the invert button in the widget settings. I disabled it and now it is working correctly. When I turn the 0 to 100 setting via invert, the issue is still there. So thanks for your time!!!