- platform: template
switches:
computer:
value_template: "{% if is_state('switch.wol', 'on') %}on{% else %}off{% endif %}"
turn_on:
service: switch.turn_on
entity_id: switch.wol
turn_off:
service: switch.turn_off
entity_id: switch.pc
Why is this giving me the following errot?
17-03-23 11:17:30 ERROR (MainThread) [homeassistant.config] Invalid config for [switch.template]: invalid template (TemplateSyntaxError: unexpected ‘%’) for dictionary value @ data[‘switches’][‘computer’][‘value_template’]. Got “{{% if is_state(‘switch.wol’, ‘on’) %}on{% else %}off{% endif %}}”.