Activate instead of toggle switch in UI

Hi

Old question but still no answer: I want to activate a script from the GUI. The script does have delay commands. Thus, it is shown on the GUI with a toggle switch. But since this does not make sense for this script, I would like to have the regular “Activate”. I tried to put the “can_cancel” almost everywhere, but this seems not to work anymore?! How can I change form toggle switch to Activate? THX!!

2020-03-14_09h51_59

I don’t see that option anywhere in the script documentation.

However, assuming this undocumented option can be used, did you try:

script:
  your_script:
    can_cancel: false
    sequence:
      - blah blah...

Yes. But this would have been too easy… :wink:

2020-03-14_10h28_16

I also tried to put it on top of RAW Config editor with no success:

script.jalousie_halb
  can_cancel: false

Then I guess it is not valid option, as per the docs.

can_cancel goes in customize

homeassistant:
  customize:
    script.jalousie_halb:
      can_cancel: false
1 Like

OK. But where do I put it if I don’t have customize.yaml (I use UI to configure)?

Configuration -> Customization:

But still no luck. It seems that the changes are not beeing saved.

Copy what I wrote, exactly, preserving the indentation and paste it into your configuration.yaml with the h of homeassistant up against the left edge of the page.

Then save the file and restart homeassistant.

Hey! Thx a lot! This does work!

But it also should be possible to change the value of can_cancel with the GUI (Config -> Customization), shouldn’t it?

1 Like

No idea, never used the gui for customisation. If you’re happy you did it correctly and it didn’t work but should have, submit a bug report :slightly_smiling_face:

Yes I am happy and I thank you very much for your help!

I try to read and understand as much of the docs as I can, but as a non IT guy I sometimes have a hard time to understand how and why things do or do not work within HASS and how things have to be configured properly…