How to make an automation that I only run manually from HA

as I understood from the help, triggers and conditions are not necessary, I create this one

- id: '6d4c566e-2362-4b6c-b821-aa83604e7c6f'
  alias: Movie
  actions:
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.kabinet_stena
  mode: single

That is, I want the light to turn off when the automation is turned on.

Error:required key not provided @ data[‘triggers’]. Got None.

So I need a trigger ? how can I just start the automation from HA by switching the slider in the list where all automations are ?

Hi D,

You want a script, not an automation.

can you show me script with simple example with turn the light off ?

If you have a way of getting the state of the media player into HA use that as a trigger instead.

its not help
I just copy past script from help and have errors that i dont understand

There is a script UI editor. It will help you write a script.
Open your Home Assistant instance and show your scripts.

1 Like