Hello, I have one automation which has a trigger with some event from esphome integration. When that event occurs, in my action part Im calling a script which is setting up the tv and gets as input arg a string should open netflix, yt, or some other app.
Here is my automation:
- alias: Bedroom TV toggle via encoder
trigger:
platform: event
event_type: esphome.bedroom_entrance
event_data:
type: single_short_click_3
action:
- service: script.turn_on
entity_id: script.bedroom_tv
data:
tvsource: "Netflix"
and the script:
alias: Prepare Bedroom TV
icon: "mdi:party-popper"
description: 'Turn on TV and set source'
fields:
tvsource:
description: Particular application (eon, yt, netflix..)
example: Netflix
sequence:
- service: media_player.turn_on
entity_id: media_player.bedroom_tv
- service: media_player.select_source
data_template:
entity_id: media_player.bedroom_tv
source: "{{ tvsource }}"
Im using webos component.
but for some reason Im getting the “standard” error that extra keys are not allowed @data[‘tvsource’]. Why?