-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturn_everything_off.yaml
47 lines (40 loc) · 1.25 KB
/
turn_everything_off.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
---
turn_everything_off:
alias: 'Turn Everything Off Script'
sequence:
- action: input_boolean.turn_on
entity_id: input_boolean.turn_everything_off_failed
- action: script.alexa_notification
data:
alexa_device: media_player.kitchen_echo
notification_type: announce
current_volume: >-
{{ state_attr('media_player.kitchen_echo', 'volume_level') }}
message: >-
Closing all shutters now, will turn off the lights & lock the doors in 20 seconds.
- action: cover.set_cover_position
data:
position: 0
target:
entity_id: group.public_space_shutters
- action: homeassistant.turn_off
target:
entity_id:
- group.all_ac
- group.all_lights
- wait_for_trigger:
- platform: state # yamllint disable-line rule:indentation
entity_id: binary_sensor.entrance_door_contact
to: 'off'
for:
seconds: 30
timeout: "00:03:00"
continue_on_timeout: true
- action: lock.lock
target:
entity_id:
- lock.entrance_door
- lock.kitchen_door
- lock.kids_bathroom_door
- action: input_boolean.turn_off
entity_id: input_boolean.turn_everything_off_failed