Working on a tablet interface with Picture Elements… some of my icons triggers scripts that take some time to run and therefore the feedback on the tablet is not what I want it to be.
Is there a way do something like a JavaScript onClick and change the attributes of the icon that you click?
Thinking something like a shortcut is normally a image with colors and when clicked it turns to grayscale for a few seconds just to show the user that the click is received and the script is running…
Could you do something with a sensor template? I have a picture element card where the icons change depending on the state of batteries. The sensors are defined in configuration.yaml:
The icons are different depending on state of the sensors/lights/etc…
Two problems…
The light might take a few seconds to report back the changed state and therefore the icon on the tablet doesn’t change immediately when someone presses the icon
For “shortcuts” to scripts and automations I can’t see how this can be done… can you change the image depending on something like “is the script running” ?