forked from gazoscalvertos/Hass-Custom-Alarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automation.yaml
87 lines (81 loc) · 2.5 KB
/
automation.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
- id: alarm_armed_away
alias: '[Alarm] Away Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_away'
action:
- data:
message: 'Alarm Away Mode Armed'
target: email/[email protected]
service: notify.pushbullet
- data:
message: 'The house alarm has been switched on in away mode. Goodbye'
service: notify.example_phone_tts
- id: alarm_armed_home
alias: '[Alarm] Home Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_home'
action:
- data:
message: 'Alarm Home Mode Armed'
target: email/[email protected]
service: notify.pushbullet
- data:
message: 'The house alarm has been switched on in home mode. Goodnight'
service: notify.example_phone_tts
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- data:
message: 'House alarm activating, ensure all doors and windows are closed'
service: notify.example_phone_tts
- id: alarm_disarmed
alias: '[Alarm] Disarmed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'disarmed'
action:
- service: notify.pushbullet
data:
message: 'Alarm Disabled'
target: email/[email protected]
- service: switch.turn_off
entity_id: switch.siren_switch
- data:
message: 'The house alarm has been Deactivated'
service: notify.example_phone_tts
- id: alarm_triggered
alias: '[Alarm] Triggered'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'triggered'
action:
- service: switch.turn_on
entity_id: switch.siren_switch
- service: notify.pushbullet
data:
message: 'ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'
target: email/[email protected]
- id: alarm_warning
alias: '[Alarm] Warning'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'warning'
action:
- service: notify.pushbullet
data:
message: 'ALARM Warning {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'
target: email/[email protected]
- data:
message: 'Hello, the house alarm has been tripped. Please deactivate'
service: notify.example_phone_tts