I have a command line switch with a CLI script defined for command_on, command_off and command_state.
The problem is that the commands take several seconds to complete… I see the notification at the bottom of the browser window that the command has completed then I see the switch toggle it self back to the off state, a few seconds later the state script must be completing as I later see it switch back.
This causes some confusion for users of the system in my house as they sometimes try to tap the switch again when they see it flop back.
I wonder if something could be done where the state is checked before animating the switch back or if a delay for state verification could be set for longer running CLI scripts?