Hi,
I’m trying to pass a variable to a script using the guide found here https://www.home-assistant.io/components/script/.
My scripts usually work fine, but now that I’m using Description and Fields (in accordance to the guide), I’m always getting an error message when trying to check my config:
My original code, which is part of a larger script file (hence no initial “script” tag):
play_playlist:
description: 'Play Spotify playlist on TV'
fields:
media_content_id:
description: 'The playlist URI'
example: 'spotify:playlist:verylongidgoeshere'
sequence:
- service: spotify.play_playlist
data_template:
media_content_id: "{{ media_content_id }}"
random_song: true
To break it down even more I just copy/pasted the example in the guide and put it straight in configuration.yaml, but even that doesn’t work, same error for both Description and Fields.
# Example configuration.yaml entry
script:
notify_pushover:
description: 'Send a pushover notification'
fields:
title:
description: 'The title of the notification'
example: 'State change'
message:
description: 'The message content'
example: 'The light is on!'
sequence:
- condition: state
entity_id: switch.pushover_notifications
state: 'on'
- service: notify.pushover
data_template:
title: "{{ title }}"
message: "{{ message }}"
Error:
Invalid config for [script]: [description] is an invalid option for [script]. Check: script->script->notify_pushover->description. (See /config/configuration.yaml, line 174). Please check the docs at Scripts - Home Assistant
I’m on HA 0.97.2
The error is pointing to the description field in notify_pushover, if I remove this the error points to the fields field. And if I remove both there’s no error (but I can’t pass variables to it)
Am I missing something or is there an error in the documentation?