forked from AppDaemon/appdaemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.yaml
316 lines (316 loc) · 9.29 KB
/
examples.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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
StudioOn:
module: sequence
class: Sequence
input: input_boolean.studio
state: "on"
sequence:
- entity: switch.basement_desk_switch
service: switch/turn_on
delay: 0
- entity: switch.basement_speakers_switch
service: switch/turn_on
delay: 5
StudioOff:
module: sequence
class: Sequence
input: input_boolean.studio
state: "off"
sequence:
- entity: switch.basement_speakers_switch
service: switch/turn_off
delay: 0
- entity: switch.basement_desk_switch
service: switch/turn_off
delay: 5
Commute:
module: commute
class: Commute
limit: 40
sensor: sensor.wendy_work_to_home
time: "16:30:00"
notify:
- andrew_mail
- wendy_mail
constrain_days: mon,tue,wed,thu,fri
Battery Check:
always_send: '0'
class: Battery
dependencies: globals
module: battery
threshold: '25'
inactive_mins: 1440
Dark Day:
class: DarkDay
constrain_input_select: input_select.house_mode,Day
constrain_presence: anyone
dependencies: globals
end_time: sunset - 02:00:01
entity_off: scene.downstairs_off
entity_on: scene.downstairs_on
module: dark_day
sensor: sensor.side_multisensor_luminance
start_time: sunrise
Downstairs Night Light:
class: MotionLights
constrain_end_time: 04:29:59
constrain_input_select: input_select.house_mode,Night
constrain_presence: anyone
constrain_start_time: '20:00:00'
delay: '300'
dependencies: globals
entity_off: scene.downstairs_off
entity_on: scene.downstairs_dim
module: motion_lights
sensor: binary_sensor.downstairs_sensor
Drive Motion Lights:
class: MotionLights
constrain_end_time: sunrise
constrain_input_boolean: input_boolean.night_outside_motion
constrain_start_time: sunset
delay: '300'
dependencies: globals
entity_off: scene.drive_off
entity_on: scene.drive_bright
module: motion_lights
sensor: binary_sensor.drive_sensor
Doors:
class: DoorNotification
dependencies: globals
module: door_notification
sensor: cover.garage_door,binary_sensor.basement_door_sensor
Garage Momentary:
class: MomentarySwitch
delay: '3'
dependencies: globals
module: momentary_switch
switch: switch.garage_door_switch
Grandfather:
class: Grandfather
dependencies: globals,sound
end_time: '21:01:00'
media: GFChime
module: grandfather
mute_if_home: device_tracker.dedb5e711a24415baaae5cf8e880d852
player: media_player.living_room
start_time: 07:59:00
volume: '0.5'
Hardware Check:
class: HWCheck
delay: '180'
dependencies: globals
hue: light.office_1
log: '1'
module: hwcheck
notify: '1'
zwave: switch.front_path_switch
Minimote:
class: MiniMote
dependencies: globals
device: minimote_31
module: minimote
scene_1_toggle: light.office_1
scene_2_on: scene.upstairs_on
scene_3_off: scene.upstairs_off
Modes:
class: Modes
dependencies: globals,motion_lights,secure
module: modes
timers: Downstairs Night Light
Motion Notification:
class: MotionNotification
constrain_input_boolean: input_boolean.motion_notifications
constrain_presence: noone
dependencies: globals
module: motion_notification
sensor: binary_sensor.basement_sensor,binary_sensor.downstairs_sensor,binary_sensor.drive_sensor,binary_sensor.garage_sensor,binary_sensor.porch_multisensor_sensor,binary_sensor.upstairs_sensor
Occupancy Simulator:
class: OccuSim
module: occusim
dependencies: globals
enable: input_boolean.vacation,on
log: '1'
random_office_end: Night
random_office_maxduration: 00:30:00
random_office_minduration: 00:03:00
random_office_name: Evening Office
random_office_number: '3'
random_office_off_1: scene.office_off
random_office_on_1: scene.office_on
random_office_start: Evening
step_evening_name: Evening
step_evening_start: sunset - 00:45:00
step_lightsout_end_offset: 01:00:00
step_lightsout_name: Lights Out
step_lightsout_off_1: scene.bedroom_off
step_lightsout_relative: Night
step_lightsout_start_offset: 00:05:00
step_morning_days: mon,tue,wed,thu,fri
step_morning_end: 06:00:00
step_morning_name: Morning
step_morning_on_1: event.MODE_CHANGE,mode
step_morning_start: 05:30:00
step_night_end: '22:30:00'
step_night_name: Night
step_night_on_1: event.MODE_CHANGE,mode
step_night_start: '21:30:00'
step_upstairs_hall_off_1: scene.upstairs_hall_off
step_upstairs_hall_off_end_offset: 00:05:00
step_upstairs_hall_off_name: Upstairs Hall Off
step_upstairs_hall_off_relative: Night
step_upstairs_hall_off_start_offset: 00:01:00
test: '0'
Outside Lights:
class: OutsideLights
dependencies: globals,motion_lights
module: outside_lights
off_scene: scene.outside_off
on_scene: scene.porch_on
timers: Porch Motion Lights
Porch Motion Lights:
class: MotionLights
constrain_end_time: sunrise - 00:05:00
constrain_input_boolean: input_boolean.night_outside_motion
constrain_start_time: sunset + 00:00:01
dependencies: globals
entity_off: scene.porch_on
entity_on: scene.porch_bright
module: motion_lights
sensor: binary_sensor.porch_multisensor_sensor
Presence:
announce: Wendy
class: Presence
day_scene_absent: scene.downstairs_off
day_scene_present: scene.downstairs_off
dependencies: globals,sound
input_select: input_select.house_mode,Day
module: presence
night_scene_absent: scene.downstairs_front
night_scene_present: scene.downstairs_on
notify: '1'
vacation: input_boolean.vacation
volume: '0.3'
Smart Heat:
class: SmartHeat
dependencies: globals
evening_on: '17:00:00'
input_select: input_select.house_mode,Morning,Day,Evening
module: smart_heat
morning_on_week: 05:30:00
morning_on_weekend: 06:30:00
off_temp: '60'
on_temp: '70'
switch: input_boolean.heating
thermostats: climate.upstairs_thermostat_heating_1,climate.downstairs_thermostat_heating_1
Smoke Alarm:
class: SensorNotification
dependencies: globals
idle_state: Idle
input_select: input_select.house_mode,Night,Morning
module: sensor_notification
sensor: sensor.basement_smoke,sensor.downstairs_smoke,sensor.upstairs_smoke
turn_on: scene.house_bright
Lock:
class: SensorNotification
dependencies: globals
idle_state: Idle
module: sensor_notification
sensor: sensor.front_door_action
Sound:
base: media
class: Sound
dependencies: globals
ip: 192.168.1.20
module: sound
player: media_player.living_room
port: '8123'
Switch Reset:
class: SwitchReset
delay: '10'
dependencies: globals
file: /etc/appdaemon/switches.db
log: '1'
module: switch_reset
Visitor Night Light:
class: MotionLights
constrain_input_boolean: input_boolean.guest
constrain_input_select: input_select.house_mode,Night
constrain_presence: anyone
delay: '300'
dependencies: globals
entity_off: scene.upstairs_hall_off
entity_on: scene.upstairs_hall_dim
module: motion_lights
sensor: binary_sensor.upstairs_sensor
alexa:
class: Alexa
module: alexa
dependencies: secure,modes
apps:
secure: Security
modes: Modes
Security:
class: Secure
module: secure
dependencies: sound
announcement_volume: 0.5
alarm_volume: 0.5
secure_panel: /Secure
secure_panel_timeout: 20
initial_message: ["working", "ok, checking", "give me a sec"]
secure_message: ["The house is now secure", "All good", "Yup, secure"]
not_secure_message: "The house is not secure"
insecure_message: "The following items are insecure :"
securing_message: "I have secured the following items: "
failed_message: "The following items failed to secure: "
alarm_cancel_message: ["Alarm has been cancelled", "uh oh, canceling alarm", "oh noes!"]
alarm_arm_message: "Alarm is armed"
alarm_disarm_message: "Alarm is disarmed"
alarm_entity: alarm_control_panel.ha_alarm
alarm_code: !secret alarm_code
alarm_notify:
tts:
message: "Alert. Alert. Alert. Alarm has been activated. Police have been notified. Please leave the premises immediately."
query_zones: ["Basement Perimeter", "Garage Perimeter", "Garage Motion", "Downstairs Perimeter", "Studio"]
secure_zones: ["Basement Perimeter", "Garage Perimeter", "Garage Motion", "Downstairs Perimeter", "Studio"]
armed_home_zones: ["Basement Motion", "Basement Perimeter", "Garage Perimeter", "Garage Motion", "Downstairs Perimeter"]
armed_away_zones: ["Basement Motion", "Basement Perimeter", "Garage Perimeter", "Garage Motion", "Downstairs Perimeter", "Downstairs Motion", "Upstairs Motion"]
zones:
Basement Motion:
binary_sensor.basement_sensor:
desired_state: "off"
Basement Perimeter:
binary_sensor.basement_door_sensor:
desired_state: "off"
state_map:
"on": "open"
"off": "closed"
Studio:
input_boolean.studio:
desired_state: "off"
service: homeassistant/turn_off
timeout: 5
Downstairs Perimeter:
lock.front_door_lock_locked:
desired_state: "locked"
service: lock/lock
timeout: 5
no_pending_check: 1
Downstairs Motion:
binary_sensor.downstairs_sensor:
desired_state: "off"
Garage Perimeter:
cover.garage_door:
desired_state: "closed"
service: cover/close_cover
timeout: 20
#state_map:
# locked: "bannana"
# unlocked: "fruitbat"
Garage Motion:
binary_sensor.garage_sensor:
desired_state: "off"
#service: lock/lock
#timeout: 20
Upstairs Motion:
binary_sensor.upstairs_sensor:
desired_state: "off"