I'm trying to build a custom intent file to control my music. I've followed the guide at https://www.home-assistant.io/voice_control/custom_sentences_yaml/ but I keep getting errors. Been trying for several hours to find the issue but no success.
Hope a fresh set of eyes help:
configuration.yaml:
intent_script: SpotifyPlaylist: speech: text: Okay, ik speel de playlist af in de {{ media_player }}. action: - action: spotcast.start data: force_playback: false random_song: true repeat: "off" shuffle: true offset: 0 start_position: 0 ignore_fully_played: false entity_id: "{{ media_player }}" uri: "{{ playlist_id }}"
custom_sentences/nl/media.yaml:
# Example config/custom_sentences/en/media.yaml language: "nl" intents: SpotifyPlaylist: data: - sentences: - "(Speel|start) [de] (playlist|afspeellijst) {playlist_id} [maar] [af] (in|op) de {media_player}" lists: media_player: values: - in: "slaapkamer" out: "media_player.bedroom" - in: "kinderkamer" out: "media_player.lenn" [..] - in: "deurbel" out: "media_player.g4_doorbell_speaker" playlist_id: values: - in: "len[n][s] favoriet[en]" out: "spotify:playlist:5AP6JNb6Z2dSAkeeJP768d" - in: "lenn" out: "spotify:playlist:54MxfdxhOGO2WEKt2LCF7z" - in: "milenco" out: "spotify:playlist:29aiPfdrGUh6TDEjvsJV3r" - in: "kerst" out: "spotify:playlist:37i9dQZF1DX4dopZ9vOp1t" - in: "top 2000" out: "spotify:playlist:1DTzz7Nh2rJBnyFbjsH1Mh"
The error I'm getting:
Template variable warning: 'media_player' is undefined when rendering '{{ media_player }}'