Hi, I am also new to home assistant, just because development from my homewizard is stopped. I would like to migrate slowly to newer stuff, but for now would also like to have the opportunity to connect my homewizard.
I am struggling with the switches and the command_line options, not getting it through the config checks:
the part of the configuration.yaml for the homewizard connections:
switch:
- platform: command_line
switches:
vswitch0:
command_on: curl “http://192.168.2.4/xxxxxx/sw/0/on”
command_off: curl “http://192.168.2.4/xxxxxx/sw/0/off”
command_state: curl “http://192.168.2.4/xxxxxx/get-status”
value_template: ‘{{ value_json.response.switches[0].status==“on” }}’
friendly_name: Lampje Hal
vswitch3:
command_on: curl “http://192.168.2.4/xxxxxx/sw/3/on”
command_off: curl “http://192.168.2.4/xxxxxx/sw/3/off”
command_state: curl “http://192.168.2.4/xxxxxx/get-status”
value_template: ‘{{ value_json.response.switches[3].status==“on” }}’
friendly_name: Buitenlamp voordeur
this keeps giving lost of errors, tried some changing is spaces etc, but nothing sofar.
Configuration invalidCHECK CONFIG
Invalid config for [switch.command_line]: invalid template (TemplateSyntaxError: unexpected char ‘“’ at 44) for dictionary value @ data[‘switches’][‘vswitch0’][‘value_template’]. Got ‘‘{{ value_json.response.switches[0].status==“on” }}’’ invalid template (TemplateSyntaxError: unexpected char ‘“’ at 44) for dictionary value @ data[‘switches’][‘vswitch3’][‘value_template’]. Got ‘‘{{ value_json.response.switches[3].status==“on” }}’’. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.command_line/