Activate/on/off for script

I had the same question myself after release 0.113.

Check here and here and the following posts/answers.

Hi @pplucky

Can for the quick response. I’ve read through the link you provided but I can’t seem to find out how I now stop a script being cancelled.

Currently I’m trying to setup a Lovelace button to run the script but not offer the option to cancel the run. I’m using a button entity and on the first click it runs the script but if the user clicks the button again it cancels the script. Any ideas how I can stop the script being cancelled if can_cancel has been removed as an option?

My understanding is that this is no longer possible, not sure exactly why, but probably due to the improvements/changes introduced in scripts from 0.113 on…

@pplucky - Thanks for pointing me at the latest documentation. I can see what they’ve done and now realise it’s how you call the script. I’ve now called the script using the following code and it works. First click runs the script and second click doesn’t do anything.

type: custom:button-card
entity: script.light_test
tap_action:
  action: call-service
  service: script.light_test
1 Like