Command line cover with shell command

Hi guys. I really need your help with my rollershutters.


edit: I think my question should be, How do I call a service in command line cover.


I’m on newest hassbian.

Whats working:
I created a shell_command for every rollershutter with up stop and down like this

shell_command:
  rollup1all: '/home/pi/rollremote/codeSend 876785752875'
  rolldown1all: '/home/pi/rollremote/codeSend 876785752876'
  rollstop1all: '/home/pi/rollremote/codeSend 876785752877'

When I trigger the following rule the rollershutter will go down!

- action:
  - service: shell_command.rolldown1all
  alias: down
  condition: []
  id: '1519593252296'
  trigger:
  - above: '60'
    entity_id: sensor.temperature_158d000171998b
    platform: numeric_state

Here comes the part which is not working:

cover:
  - platform: command_line
    covers:
      gruppe3_alle:
        command_open: shell_command.rollup1all
        command_close: shell_command.rolldown1all
        command_stop: shell_command.rollstop1all

What am I doing wrong with the command-line cover?!

If you want to use the shell_command service, you have to use the Template Cover

In the command_line cover you have to call your scripts directly.

cover:
  - platform: command_line
    covers:
      gruppe3_alle:
        command_open: '/home/pi/rollremote/codeSend 876785752875'
        command_close: '/home/pi/rollremote/codeSend 876785752876'
        command_stop: '/home/pi/rollremote/codeSend 876785752877'
1 Like

awesome. works with the template cover :slight_smile: thank you very much

What is the easiest way to resend the command several times to make it more reliable?

Make a script an call it from the template cover.

script:
  cover_down:
    sequence:
      - service: shell_command.rolldown1all
      - delay: '00:00:01'
      - service: shell_command.rolldown1all
1 Like

perfect. can I ignore the state of the cover so home assistant does not “grey out” the commands.

Untitled

Yep! position_template: 50

1 Like