I understand that either an “execute” or a toggle button will be displayed on the Lovelace GUI depending on whether the called script contains a delay or pause action.
And I have such a script which really simply turns on and off a light with a 10 seconds delay in between.
I can use the presented toggle button to run the script and it runs fine, but the toggle does not remain in the on position while the script is running. And while I run the script I see that it’s state remains as On for the appropriate 10 seconds or so.
This doesn’t seem to be the correct behaviour. Am I missing something?
Toggle moves to off position after a few seconds automitcally
Reload page
Toggle shows to be on again.
Same works in reverse. If I turn the toggle off, the script turns off but the toggle automatically returns to the on position after a few seconds. Reloading the page show the toggle in the correct (off) position again.
Also, another thing I’ve noticed: if you create an “entity button” within the lovelace interface to toggle a script, the state of the script (on or off) isn’t reflected in the button’s state, even after a refresh.
So I’m expecting the entity button to go yellow when the button is pushed (and while the script is running) but the colour doesn’t change. Do you find the same?