I have got an issue with a script where I want to do 'things' based on a given parameter. The action is quite plain and simple. Can anybody help me with the condition? Error:
The definition of the script is as follows:
alias: Switch the valve on/off
icon: mdi:text
description: This script switches the valve after hitting the button in lovelace
fields:
valve_action:
description: "The action to be performed on the valve"
advanced: false
required: true
example: "off"
default: "onoff"
mode: queued
sequence:
- conditions:
- condition:
value_template: "{{ valve_action == 'onoff' }}"
sequence:
- service: switch.turn_on
target:
entity_id: switch.l2_bathroom01a_ssr_01
data: {}```