Command_line switch, value_template question

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

actually my workaround is a script to set the return value

#!/bin/bash

RES=`/usr/bin/curl -X GET http://192.168.200.165/relay/state`

if [[ "$RES" =~ .*relay..1..state.* ]]; then
   exit 0
else
   exit 1
fi
        command_state: "/usr/local/bin/relay_state"

without using a vaue_template, but I like to do it without a additional script