-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathred_alert.yaml
41 lines (37 loc) · 1.55 KB
/
red_alert.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
automation:
- alias: Lehavim red alert
id: red_alert_lehavim
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.oref_alert
to: 'on'
action:
- action: notify.ohad_telegram
data_template:
message: >-
Red alert in Lehavim, you got 45 seconds to get to a shelter
- action: lock.unlock
entity_id: lock.kitchen_door
- action: switch.turn_on
entity_id:
- switch.shellyplus2pm_d48afc581860_switch_1 # Pantry
- switch.shellyplus2pm_d48afc581860_switch_1 # Kitchen path flood light
- switch.shellyplus2pm_fcb467a557a0_switch_0 # Bathroom door
- switch.shellyplus2pm_c4d8d557f404_switch_1 # Clinic door
- switch.shelly1pmminig3_34b7da8f8b78_switch_0 # Main hallway
- switch.shelly1pmminig3_34b7da8b78c4_switch_0 # Shelter entrance
- switch.shelly1pmminig3_34b7da8a0338_switch_0 # Shelter main
- switch.shellyplus2pm_a0a3b3682b10_switch_0 # Basement main
- switch.shellyplus2pm_a0a3b3682b10_switch_1 # Piano light
- action: script.alexa_notification
data:
alexa_device: media_player.everywhere
notification_type: announce
current_volume: >-
{{ state_attr('media_player.kitchen_echo', 'volume_level') }}
message: >-
Red alert, please head to the nearest shelter now.
Red alert, please head to the nearest shelter now.
Red alert, please head to the nearest shelter now!