Hi! The next easy job im failing. I can’t get the right command_state. I don’t get any change.
For my three test I get only this and nothing change when I turn off/on the motion detection of my cam.
test1: OFF
test2: ON
test3: ON
I check my command on the command line parallel and I get 1/0 but not from the switch
- platform: command_line
switches:
test1:
command_on: echo 1
command_off: echo 0
command_state: ps aux | grep "6/cgi-bin/event" | grep -v grep >/dev/null && echo 1 || echo 0
value_template: '{{ value == "1" }}'
friendly_name: TEST1
- platform: command_line
switches:
test2:
command_on: echo 1
command_off: echo 0
command_state: ps aux | grep "6/cgi-bin/event" | grep -v grep >/dev/null && echo 1 || echo 0
value_template: '{{ value == "0" }}'
friendly_name: TEST2
- platform: command_line
switches:
test3:
command_on: echo 1
command_off: echo 0
command_state: ps aux | grep "6/cgi-bin/event" | grep -v grep >/dev/null && echo 1 || echo 0
friendly_name: TEST3
it looks like ha aborts the command after && and doesn’t look at the echo after || anymore