Hi all, I’m trying to use a script to run a random script. Below is my code:
random:
alias: Random
mode: single
sequence:
- data_template:
entity_id: >
{{ ["script.red", "script.blue", "script.green"]
| random}}
service: script.turn_on
When but I get the following error:
Invalid config for [script]: must contain at least one of service, service_template. @ data[‘script’][‘random’][‘sequence’][0]. Got OrderedDict([(‘data_template’, OrderedDict([(‘entity_id’, ‘{{ [“script.red”, “script.green”, “script.blue”]\n | random}}\n’), (‘service’, ‘script.turn_on’)]))]). (See /config/configuration.yaml, line 17). Please check the docs at Scripts - Home Assistant
I tried looking at the data templates page and tried using service, and service_template but basically get the same error