I’m getting ‘invalid config’ when I’m trying to add command line switch entries to my config file.
after a couple of problems with tabs being in there instead of spaces I got to the point that HASS will start but it gives me notice that it’s not configured correctly.
this is an example of the exact terminal command I can use directly
sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1
and this is what I initially pasted into my configuration file
switch:
platform: command_line
switches:
Relay_1:
command_on: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1’
command_off: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 0’
command_state: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 status’
value_template: '{{ value == "1" }}'
friendly_name: Relay_1
with that not working, I thought I’d trim it back to the basics and tried this
switch:
platform: command_line
switches:
Relay_1:
command_on: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1’
command_off: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 0’
Can someone point me in the right direction here?
as a second question
The relay board I have has 8 relays on it, so when copying and pasting (and incrementing the name and terminal commands) where should I start and stop?
The entire thing from ‘switch:’ or can I just copy (&increment) from “Relay_2:”