Need a little help finalizing the code for a script run from a button. Using the VLC add on I want to select a file to play each time the script runs but so far cannot get it to work.
Hopefully someone can help correct where I have gone wrong. Thanks in advance.
This is the script -
alias: Audio VLC Player
description: VLC Telnet will play the audio file selected
triggers: []
conditions: []
actions:
- type: turn_on
device_id: 3fa33906516*********************
entity_id: 0c5e1d42542*********************
domain: switch
enabled: false
- action: media_player.media_play
target:
entity_id: media_player.vlc_telnet
data:
media_content_id: /media/AudioFile.wav
media_content_type: audio/wav
- action: media_player.volume_set
data:
volume_level: 0.22
target:
entity_id: media_player.vlc_telnet
- action: whatsapp.send_message
metadata: {}
data:
clientId: default
to: 1203632**********@g.us
body:
text: Someone has entered the building
- delay:
hours: 0
minutes: 2
seconds: 00
milliseconds: 0
- action: media_player.media_stop
metadata: {}
data: {}
target:
entity_id: media_player.vlc_telnet
- type: turn_off
device_id: 3fa33906516*********************
entity_id: 0c5e1d42542*********************
domain: switch
enabled: false
mode: single
I am getting this error -
extra keys not allowed @ data['media_content_id']. Got None extra keys not allowed @ data['media_content_type']. Got None