Advertisement
xangin

HA earthquake alert automation

Apr 24th, 2024 (edited)
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.49 KB | None | 0 0
  1. - id: '1714012413709'
  2.   alias: earthquake_automation
  3.   description: 地震預報通知
  4.   mode: single
  5.   trigger:
  6.   - platform: webhook
  7.     allowed_methods:
  8.    - POST
  9.     local_only: true
  10.     webhook_id: trigger_ea_command
  11.   condition: []
  12.   action:
  13.   - variables:
  14.       lv: '{{ trigger.json.level[:1] | int }}'
  15.       time: '{{ trigger.json.seconds }}'
  16.   - alias: Line通知
  17.     service: notify.line_notify
  18.     data:
  19.       message: 警告!{{ lv }}級地震將在{{ time }}秒後抵達
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement