Parallel Automation Actions

I have tried to initiate a parallel SSH command using :

I have inserted the command in parallel block but the automation always runs in sequential pattern.
It waits until the command runs and then initiate the other actions .

My command takes 30 seconds to run which makes it useless to run the other actions.

Have you tried putting the SSH command in a script, then calling the script from the automation with script.turn_on? The automation should continue without waiting for the script to finish.

Same Behavior

Um… two automations? :thinking:

Complex automation and could make a chaos behavior.
I have simplified it to identify which action is messing with the parallel behavior and found the issue.

Simple automation to demonstrate the issue ,
I have noticed another weird behavior , When running the below automation the UI becomes unusable for the 60 seconds until it executes it.

parallel:

  • service: ssh_command.exec_command
    metadata: {}
    data:
    host: X.X.X.X
    port: 22
    user: MyUsername
    pass: MyPassword
    command: sleep 60s
  • service: todo.add_item
    metadata: {}
    data:
    item: Test Item
    target:
    entity_id: todo.simon
parallel:
  - service: ssh_command.exec_command
    metadata: {}
    data:
      host: x.x.x.x
      port: 22
      user: MyUserName
      pass: MyPassword
      command: sleep 60s
  - service: todo.add_item
    metadata: {}
    data:
      item: Test Item
    target:
      entity_id: todo.simon

I think the SSHCommand integration that you are using might be a blocking process on the thread that it’s being executed on. Why HA would block on a parallel thread is beyond me. You might want to open a bug report on the core github.