Widget Error

Hi,
I have a widget that causes a “script already running” error. The script is very simple (if, than, else) and I have done several tests (deleted, recreated, changed parameters, cleaned the cache) but the error continues and only with this widget.
I noticed that from the moment of pressing it passes at least 7/8 seconds to the green while instead the script starts immediately.
If I start the script directly from Home Assistant or google no error.
The widget appears to issue a double command.
How can I solve the problem?
Thanks so much

Check the companion app logs let’s see if it is indeed executing twice

Hi, thanks for the input: I read the app log and found that there is no double call of the script.
In practice this happens: when I press or the widget, if I use the home wifi network everything works fine and I have no errors in the home assistant while if I use the cellular network in the app log there is no trace of errors but it appears in the home assistant “script already running”.
So it’s a latency problem?