I’ve made a simple script that contains a delay to show a switch icon instead of the “EXECUTE” text on the LL card and to align it with the behavior of my actual MQTT payload (a Tasmota RF command for a Sonoff RF Bridge). The relevant script config:
Now when I click/push the switch that appears in the card, it sends the MQTT message, and then in about a second the switch slides back to its initial position. What I want (and what I thought it works like) is to have it slide back when it has executed the full script, which would be 5 seconds. Also, as bonus, and if possible, I want to disable/gray out the switch icon somehow to prevent it from being clicked on while the script runs. This is because the gate controlled via RF can’t take subsequent commands within about 5 seconds.
Is there a simple solution for this? Am I doing it the right way in HA?
Clicking the switch slides it to ON position, and then after about 2 seconds, it slides back by itself. Meanwhile the script should still be running for about 3 more seconds. Does it seem like a bug?