-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscripts.yaml
73 lines (70 loc) · 2.29 KB
/
scripts.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
open_daryls_garage_door:
alias: "Open Daryl's Garage Door"
sequence:
- condition: state
entity_id: sensor.daryls_garage_door
state: 'closed'
- service: switch.turn_on
entity_id: switch.garage_daryl_switch
- delay:
seconds: 3
- service: switch.turn_off
entity_id: switch.garage_daryl_switch
- service: notify.html5
data:
message: "Your garage door was opened at {{ as_timestamp(now()) | timestamp_custom('%I:%M%p', true) }}."
title: "Alert:"
target: "Daryl's 2XL"
data:
tag: 'garage-opened'
actions:
- action: "close_daryls_door"
title: "Close it!"
icon: mdi:garage
close_daryls_garage_door:
alias: "Close Daryl's Garage Door"
sequence:
- condition: state
entity_id: sensor.daryls_garage_door
state: 'open'
- service: switch.turn_on
entity_id: switch.garage_daryl_switch
- delay:
seconds: 3
- service: switch.turn_off
entity_id: switch.garage_daryl_switch
open_megans_garage_door:
alias: "Open Megan's Garage Door"
sequence:
- condition: state
entity_id: sensor.megans_garage_door
state: 'closed'
- service: switch.turn_on
entity_id: switch.garage_megan_switch
- delay:
seconds: 3
- service: switch.turn_off
entity_id: switch.garage_megan_switch
- service: notify.html5
data:
message: "Your garage door was opened at {{ as_timestamp(now()) | timestamp_custom('%I:%M%p', true) }}."
title: "Alert:"
target: "Megan's Pixel 2"
data:
tag: 'garage-opened'
actions:
- action: "close_megans_door"
title: "Close it!"
icon: mdi:garage
close_megans_garage_door:
alias: "Close Megan's Garage Door"
sequence:
- condition: state
entity_id: sensor.megans_garage_door
state: 'open'
- service: switch.turn_on
entity_id: switch.garage_megan_switch
- delay:
seconds: 3
- service: switch.turn_off
entity_id: switch.garage_megan_switch