Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Syntax error on value_template

$
0
0

@pierpa71 wrote:

hello,

I have this switch

switch:
  - platform: command_line
    switches:
     arest_pin_four:
       command_on: "/usr/bin/curl -X GET http://192.168.1.201/control?cmd=gpio,12,1"
       command_off: "/usr/bin/curl -X GET http://192.168.1.201/control?cmd=gpio,12,0"
       command_state: "/usr/bin/curl -X GET http://192.168.1.201/control?cmd=status,gpio,12"
       value_template: ' {{ ('{"log":"","plugin":1,"pin":12,"mode":"output","state":"1"}'|from_json).state == "1" }} '

from the Template Developer Tool the value_template is resolved correctly into a TRUE, while I get a syntax error when I put the code into configuration.yaml. What am I doing wrong?

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>