Hi,
I’m totally new to home assistant and try to configure a command_line switch. the switch (on and off) works but I don’t get the value_template working.
switch:
- platform: command_line
switches:
kitchen_light:
friendly_name: Wandlicht Esszimmer
command_on: "/usr/bin/curl -X GET http://192.168.200.165/relay/on"
command_off: "/usr/bin/curl -X GET http://192.168.200.165/relay/off"
command_state: "/usr/bin/curl -X GET http://192.168.200.165/relay/state"
value_template: '{{ value == "<state \"name\"=relay>1</state>" }}'
the output to stdout of “/usr/bin/curl -X GET http://192.168.200.165/relay/state” is:
<state “name”=relay>1 in on case and:
<state “name”=relay>0 in off case
May I have to escape the quotes " different?
Thx and regards
Jörg