-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscripts.yaml
More file actions
234 lines (234 loc) · 6.54 KB
/
scripts.yaml
File metadata and controls
234 lines (234 loc) · 6.54 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
226
227
228
229
230
231
232
233
234
feed_cats:
alias: Feed Cats
sequence:
- service: notify.alexa_media
data:
target: media_player.all_speakers
message: Rupert, Gunther it's dinner time you little beauties.
data:
type: announce
method: all
title: Cat's dinner time
- service: number.set_value
data:
value: '3'
target:
entity_id: number.rojeco_pet_feeder_feed
mode: single
icon: hass:cat
notify_alexa_everywhere:
alias: Notify Alexa Everywhere
sequence:
- service: notify.alexa_media
data:
title: '{{title}}'
message: '{{message}}'
target: media_player.all_speakers
data:
type: announce
method: all
notify_all:
alias: Notify All
sequence:
- data_template:
title: '{{title}}'
message: '{{message}}'
action: script.notify_alexa_everywhere
- device_id: 3cf9e880497a947bf86f81e62cdb9fc3
domain: mobile_app
type: notify
message: '{{message}}'
title: '{{title}}'
mode: single
room_controller_reset:
alias: Room Controller Reset
sequence:
- service: light.turn_off
target:
entity_id: group.{{room}}_lights
- service: entity_controller.clear_block
data:
entity_id: group.{{room}}_entities
- service: input_boolean.turn_off
target:
entity_id: group.{{room}}_overrides
mode: single
new_script:
alias: activate_alexa_actionable_notification
description: Activates an actionable notification on a specific echo device
mode: single
icon: mdi:message-badge-outline
fields:
text:
description: The text you would like alexa to speak.
example: What would you like the thermostat set to?
event_id:
description: Correlation ID for event responses
example: ask_for_temperature
alexa_device:
description: Alexa device you want to trigger
example: media_player.bedroom_echo
sequence:
- service: input_text.set_value
data:
entity_id: input_text.alexa_actionable_notification
value: '{"text": "{{ text }}", "event": "{{ event_id }}"}'
- service: media_player.play_media
data:
entity_id: '{{ alexa_device }}'
media_content_type: skill
media_content_id: amzn1.ask.skill.7c6c5354-6fd2-4c4f-9a60-165e5ce9cac9
alarm_triggered:
alias: Alarm Triggered
sequence:
- service: notify.alexa_media
data:
message: Alarm Triggered
title: Alarm Triggered
target: media_player.all_speakers
data:
type: announce
method: all
- service: media_player.play_media
target:
entity_id: media_player.all_speakers
data:
media_content_id: buzzers_pistols_01
media_content_type: sound
mode: single
icon: mdi:shield-home
yeelight_dimmer:
alias: Yeelight Dimmer Up
mode: single
icon: mdi:lightbulb-on-50
fields:
entitiy_id:
name: entitiy_id
description: The entity ID of your bulb
example: light.your_light
required: true
button_state:
name: button_state
description: The entity ID of the input_text helper for your button state
example: input_text.your_button_state
required: true
sequence:
- variables:
counter: 0
- repeat:
while:
- condition: template
value_template: '{{ counter < 10 and ''brightness_move_up'' in states(button_state)
}}'
sequence:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: 10
target:
entity_id: '{{ entity_id }}'
- delay:
seconds: 1
- variables:
counter: '{{ counter + 1 }}'
yeelight_dimmer_down:
alias: Yeelight Dimmer Down
mode: single
icon: mdi:lightbulb-on-50
fields:
entitiy_id:
name: entitiy_id
description: The entity ID of your bulb
example: light.your_light
required: true
button_state:
name: button_state
description: The entity ID of the input_text helper for your button state
example: input_text.your_button_state
required: true
sequence:
- variables:
counter: 0
- repeat:
while:
- condition: template
value_template: '{{ counter < 10 and ''brightness_move_down'' in states(button_state)
}}'
sequence:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: -10
target:
entity_id: '{{ entity_id }}'
- delay:
seconds: 1
- variables:
counter: '{{ counter + 1 }}'
camera_shed_snapshot_ai_notification:
alias: Camera - shed - Snapshot, AI & Notification
sequence:
- metadata: {}
data:
filename: ./www/snapshots/shed_snapshot1.jpg
target:
device_id: 74cbe41b5b5130da8a821ef1c1d36d1d
enabled: true
action: camera.snapshot
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
enabled: true
- metadata: {}
data:
filename: ./www/snapshots/shed_snapshot2.jpg
target:
device_id: 74cbe41b5b5130da8a821ef1c1d36d1d
enabled: true
action: camera.snapshot
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
enabled: true
- metadata: {}
data:
filename: ./www/snapshots/shed_snapshot3.jpg
target:
device_id: 74cbe41b5b5130da8a821ef1c1d36d1d
enabled: true
action: camera.snapshot
- metadata: {}
data:
prompt: 'Motion has been detected, compare and very briefly describe what you
see in the following sequence of images from my shed camera. What do you think
caused the motion alarm? If a person or car is present, describe them in detail.
Do not describe stationary objects or buildings. If you see no obvious causes
of motion, reply with "Camera has detected motion however no obvious motion
observed comparing snapshots". Your message needs to be short enough to fit
in a phone notification. '
image_filename:
- ./www/snapshots/shed_snapshot1.jpg
- ./www/snapshots/shed_snapshot2.jpg
- ./www/snapshots/shed_snapshot3.jpg
response_variable: generated_content
action: google_generative_ai_conversation.generate_content
- if:
- condition: template
value_template: "{{ generated_content['text'] == ' Camera has detected motion
however no obvious motion observed comparing snapshots.' }} \n"
then:
- stop: ''
else:
- metadata: {}
data:
title: shed Motion Detected
message: '{{generated_content[''text''] }}'
data:
image: /local/snapshots/shed_snapshot2.jpg
action: notify.mobile_app_pixel_6
mode: single
description: ''