amazon-dash icon indicating copy to clipboard operation
amazon-dash copied to clipboard

New yaml config (Amazon Dash 2.0)

Open Nekmo opened this issue 7 years ago • 1 comments

# amazon-dash 2.0
# --------------------
settings:
  delay: 10
templates:
  - template: "default"
    context:
      title: "Amazon-dash alert"
      body: "Executed {mac} successfully"
  - template: "tg"
    context:
      body: "{mac} executed"
  - template: "other"
    pipes:
      - context: body
        pipe: join
        arguments:
          - "subject"
          - "body"
devices:
  - mac: "0C:47:C9:98:4A:12"
    name: "My button name"
    actions:
      - use: "command"
        message:
          cmd: ls
      - use: "telegram-to-nekmo"
        condition: "success"
        message: "tg"
actions:
  - component: "command"
  - component: "telegram"
    config:
      token: "..."
      to: "nekmo"
    action_as: "telegram-to-nekmo"

New "device" parameters:

  • async: run actions on parallel or not. Default: false.
  • on_error: options: retry, continue (run next action), fail.

Condition vars:

  • success
  • failure
  • complete
  • state

Nekmo avatar Aug 08 '18 13:08 Nekmo

AST Docs for condition: https://www.programcreek.com/python/example/6783/ast.Compare

Nekmo avatar Aug 08 '18 14:08 Nekmo