-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
127 lines (127 loc) · 3.08 KB
/
scripts.yaml
File metadata and controls
127 lines (127 loc) · 3.08 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
close_garage_doors:
alias: Close Garage Doors
sequence:
- parallel:
- if:
- condition: state
entity_id: cover.left_garage_door
state: open
then:
- action: cover.close_cover
data: {}
target:
entity_id: cover.left_garage_door
- if:
- condition: state
entity_id: cover.right_garage_door
state: open
then:
- action: cover.close_cover
data: {}
target:
entity_id: cover.right_garage_door
mode: single
icon: mdi:garage
alarm_tasks_no_arm:
sequence:
- alias: Do alarm tasks
event: alarm_tasks_no_arm
event_data:
entity_id: alarm_control_panel.abode_alarm
alias: Alarm tasks without arming
mode: single
start_vacuum_or_mop:
alias: Start vacuum or mop
description: Starts a vacuum or mop. It makes sure it's docked first and waits for
it to complete
fields:
entity_id:
name: Entity of the vacuum or mop
description: The entity ID of the cleaning device that should be started
required: true
selector:
entity:
multiple: false
filter:
- domain: vacuum
sequence:
- if:
- condition: template
value_template: '{{ not is_state(entity_id, ''docked'') }}'
then:
- action: vacuum.stop
data: {}
target:
entity_id: '{{ entity_id }}'
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: vacuum.return_to_base
data: {}
target:
entity_id: '{{ entity_id }}'
- wait_for_trigger:
- trigger: template
value_template: '{{ is_state(entity_id, ''docked'') }}'
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- if:
- condition: template
value_template: '{{ not wait.completed }}'
then:
- variables:
result_value: false
- action: notify.mobile_app_toms_iphone
data:
title: Failed to start
message: '{{ entity_id }}''s state is {{ states(entity_id) }} and failed
to dock'
- stop: Could not start
response_variable: result_value
else: []
- action: vacuum.start
data: {}
target:
entity_id: '{{ entity_id }}'
- wait_for_trigger:
- trigger: template
value_template: '{{ is_state(entity_id, ''docked'') }}'
timeout:
hours: 4
minutes: 0
seconds: 0
milliseconds: 0
- variables:
result_value: '{{ wait.completed }}'
- stop: Finished
response_variable: result_value
mode: single
icon: mdi:robot-vacuum
disarm_alarm:
sequence:
- action: alarm_control_panel.alarm_disarm
metadata: {}
target:
entity_id: alarm_control_panel.alarm
data: {}
- action: cover.open_cover
metadata: {}
target:
entity_id: cover.right_garage_door
data: {}
alias: Arrive Home
description: ''
arm_alarm:
sequence:
- action: alarm_control_panel.alarm_arm_away
metadata: {}
target:
entity_id: alarm_control_panel.alarm
data: {}
alias: Arm Alarm
description: ''