Command line switch "Command failed" error

My HA vomits pretty often these error message, but the function actually works. It’s really weird to me.

2018-03-11 07:27:16 ERROR (Thread-4) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running
2018-03-11 07:27:27 ERROR (Thread-3) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running
2018-03-11 07:27:38 ERROR (Thread-2) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running
2018-03-11 07:27:49 ERROR (Thread-11) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running
2018-03-11 07:28:00 ERROR (Thread-19) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running
2018-03-11 07:28:11 ERROR (Thread-13) [homeassistant.components.switch.command_line] Command failed: sudo systemctl status motion --full | grep -oPc running

here is my configure.

switch surveillance_camera:
  - platform: command_line
    scan_interval: 10
    switches:
      ps3eye_service_daemon:
        friendly_name: 'PS3EYE Service'
        command_on: "/home/jaywalker/motion_on.sh"
        command_off: "/home/jaywalker/motion_off.sh"
        command_state: "sudo systemctl status motion --full | grep -oPc running"
        value_template: '{{ value == "1" }}'

It’s just ok but really bothers me… any solution?