Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- earthquake_alert:
- alias: 地震通知腳本
- variables:
- lv: "{{ level[:1] | int }}"
- sequence:
- #要做的事情放在此
- - alias: "Line通知"
- service: notify.line_notify #修改成自己的line notify名稱
- data:
- message: '警告!{{ lv }}級地震將在{{ seconds }}秒後抵達'
- - alias: "打開智慧音箱"
- service: media_player.turn_on
- data: {}
- target:
- entity_id:
- - media_player.living_room_nesthub #可同時寫多個音箱
- - media_player.guest_room_mini
- - alias: "設定智慧音箱音量"
- service: media_player.volume_set
- data:
- entity_id:
- - media_player.guest_room_mini
- - media_player.living_room_nesthub #可同時寫多個音箱
- volume_level: '0.4' #0.1~1 1是最大聲
- - alias: "智慧音箱播報"
- service: tts.edge_tts_say #修改成自己的tts服務
- data:
- entity_id:
- - media_player.living_room_nesthub #可同時寫多個音箱
- - media_player.guest_room_mini
- message: 警告!{{ lv }}級地震將在{{ seconds }}秒後抵達
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement