amazon-dash
amazon-dash copied to clipboard
New yaml config (Amazon Dash 2.0)
# 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
AST Docs for condition: https://www.programcreek.com/python/example/6783/ast.Compare