-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscripts.yaml
More file actions
225 lines (219 loc) · 5.9 KB
/
scripts.yaml
File metadata and controls
225 lines (219 loc) · 5.9 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
alert_ack_delay:
sequence:
- delay:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- service: alert.turn_on
data:
entity_id: '{{ states.alert|selectattr(''state'',''eq'',''off'')|map(attribute=''entity_id'')|join('','')
}}
'
mode: single
alias: alert-ack-delay
alert_ack_all:
alias: alert-ack-all
sequence:
- service: alert.turn_off
data:
entity_id: '{{ states.alert|selectattr(''state'',''eq'',''on'')|map(attribute=''entity_id'')|join('','')
}}
'
mode: single
create_every_light_group:
sequence:
- service: group.set
data:
object_id: 'group.all_lights:'
entities: '{{ states.light | map(attribute=''entity_id'') | join('','') }}
'
create_every_automation_group:
sequence:
- service: group.set
data:
object_id: 'group.all_automations:'
entities: '{{ states.automation | map(attribute=''entity_id'') | join('','')
}}
'
create_every_switch_group:
sequence:
- service: group.set
data:
object_id: group.switches
entities: '{{ states.switch | map(attribute=''entity_id'') | join('','') }}
'
let_the_chickens_out:
alias: Let the chickens out
sequence:
- service: automation.turn_off
target:
entity_id: automation.chicken_pen_door_lockout
data:
stop_actions: true
- service: cover.open_cover
metadata: {}
data: {}
target:
entity_id: cover.chicken_pen
description: ''
icon: mdi:food-drumstick
house:
alias: house
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_tree_1
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
all_trees_random:
alias: all trees random
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_tree_1, light.wled_half, light.wled_mid, light.wled_yard
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
half_random:
alias: half random
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_half
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
mid_random:
alias: mid random
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_mid
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
yard:
alias: yard
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_yard
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
all_trees_each_random:
alias: all trees each random
sequence:
- action: select.select_option
target:
entity_id: select.wled_tree_1_color_palette
data:
option: '{{ state_attr(''select.wled_tree_1_color_palette'', ''options'') |
random }}'
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_tree_1
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
- action: select.select_option
target:
entity_id: select.wled_half_color_palette
data:
option: '{{ state_attr(''select.wled_tree_1_color_palette'', ''options'') |
random }}'
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_half
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
- action: select.select_option
target:
entity_id: select.wled_mid_color_palette
data:
option: '{{ state_attr(''select.wled_tree_1_color_palette'', ''options'') |
random }}'
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_mid
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
- action: select.select_option
target:
entity_id: select.wled_yard_color_palette
data:
option: '{{ state_attr(''select.wled_tree_1_color_palette'', ''options'') |
random }}'
- action: light.turn_on
metadata: {}
target:
entity_id: light.wled_yard
data_template:
effect: '{{ state_attr("light.wled_tree_1", "effect_list") | random }}'
description: ''
brett_bath_set:
alias: Brett Bath Set
sequence:
- action: input_datetime.set_datetime
metadata: {}
data:
timestamp: '{{ now().timestamp() }}'
target:
entity_id: input_datetime.brett_bath
description: ''
ty_bath_set:
alias: Ty Bath Set
sequence:
- action: input_datetime.set_datetime
metadata: {}
data:
timestamp: '{{ now().timestamp() }}'
target:
entity_id: input_datetime.ty_bath
description: ''
populate_roborock_scripts:
sequence:
- target:
entity_id: input_select.robo_rock_scripts
data:
options: "[\n{% for entity_id in states.button | map(attribute='entity_id')
if 'roborock_q' in entity_id %}\n \"{{ states[entity_id].attributes.friendly_name
}}\"{% if not loop.last %}, {% endif %}\n{% endfor %}\n]\n"
action: input_select.set_options
alias: populate-roborock-scripts
description: ''
run_vacuum_later:
sequence:
- wait_for_trigger:
- trigger: numeric_state
entity_id:
- zone.home
for:
hours: 0
minutes: 1
seconds: 0
attribute: persons
below: 1
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- action: button.press
target:
entity_id: '{% for entity_id in states.button | map(attribute=''entity_id'')
if states[entity_id].attributes.friendly_name == states.input_select.robo_rock_scripts.state
%} {{ states[entity_id].entity_id }}{% if not loop.last %}, {% endif %} {%
endfor %}
'
alias: run vacuum later
description: ''