I have this script that I use when I go to bed to wait two minutes and then turn off all the lights:
alias: All lights off
sequence:
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id:
- light.maxcio_dimmer
- light.osram_sylvania_zigbee_3_0_dali_conv_li_9ad2ce15_level_on_off
mode: single
icon: mdi:lightbulb-group-off
I put this script as a service button widget with script.turn_on
on my home screen on Android.
It works fine the first time I start it, but if I forget whether I started it again and hit it a second time, it will take forever to confirm (turn into a green checkmark).
I have a guess what might be happening. The docs (for automations, but I’m assuming scripts work the same way) mention that a warning is generated when a single
script is run again:
I’m not sure how this “warning” is actually represented in the API, but maybe it causes the Android widget to think that starting the script wasn’t successful?