Hi there
I try to get multiple command line switches to work. One turns on motion and the other one should control the power of the USB-hub…
switch:
- platform: command_line
name: Camera
switches:
camera:
friendly_name: Kamera
command_on: sudo service motion start
command_off: sudo service motion stop
USB:
friendly_name: USB
command_on: sudo ./hub-ctrl -h 0 -P 2 -p 1
command_off: sudo ./hub-ctrl -h 0 -P 2 -p 0
So it says that the identifier “USB” is not valid. Where can I find a list of all valid identifiers? How can I build my own? How can I connect a cmd sensor which monitors the status of the service “motion” so the switch shows the current camera status correctly after a restart? Thank you guys for the help!!