-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfiguration.yaml
executable file
·382 lines (349 loc) · 11 KB
/
configuration.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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
---
default_config:
homeassistant:
# Load packages
packages: !include_dir_named packages
# Customization file
customize: !include customize.yaml
logger:
default: warn
logs:
homeassistant.components.rest: warn
homeassistant.components.rest_command: warn
homeassistant.components.rest_cmd: debug
homeassistant.components.mqtt: warn
homeassistant.components.harmony: warn
homeassistant.components.lutron_caseta: warn
lovelace:
mode: storage
dashboards:
ho-me:
mode: yaml
title: Dashboard
icon: mdi:script
show_in_sidebar: true
filename: ui-lovelace.yaml
api:
alexa:
smart_home:
filter:
include_entities:
- light.office_lights
- light.cree_connected_a_19_60w_equivalent_c11b0bfe_level_on_off
- light.living_room_floor_lamp
- light.christmas_tree
- scene.media
# Monitor system health
system_health:
# Monitor Device Presence
device_tracker:
- platform: ddwrt
host: !secret ddwrt_host
ssl: true
verify_ssl: false
username: !secret ddwrt_admin_username
password: !secret ddwrt_admin_password
interval_seconds: 15
consider_home: 180
new_device_defaults:
track_new_devices: true
- platform: ddwrt
host: !secret ddwrt2_host
ssl: true
verify_ssl: false
username: !secret ddwrt2_admin_username
password: !secret ddwrt2_admin_password
interval_seconds: 15
consider_home: 180
new_device_defaults:
track_new_devices: true
# Can't use Bluetooth since I don't have bluetooth adapter on this hardware
# - platform: bluetooth_tracker
# - platform: bluetooth_le_tracker
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# https://www.home-assistant.io/components/http/
http: !include secret.http.yaml
timer:
outdoor_motion:
duration: '00:00:15'
# Discover some devices automatically
discovery:
ignore: []
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
recorder:
purge_keep_days: 8
db_url: !secret recorder_db_url
# exclude:
# domains:
# - automation
# - device_tracker
# - weblink
# - updater
# - group
# - scene
# - script
# - sun
# - timer
# - weather
# entities: {}
# Sensors
sensor:
# Weather prediction
#- platform: yr
# Track the moon
#- platform: moon
# Raspberry Pi System Resources
- platform: systemmonitor
resources:
- type: load_1m
- type: load_5m
- type: load_15m
- type: processor_use
- type: memory_use_percent
- type: swap_use_percent
# Custom Sensors
- platform: template
sensors:
environment:
friendly_name: 'Environment'
value_template: !secret ENVIRONMENT
thermostat_current_humidity:
value_template: '{{ (state_attr("climate.thermostat", "current_humidity") | int ) }}'
friendly_name: 'Current Humidity'
unit_of_measurement: '%'
icon_template: mdi:water-percent
thermostat_current_temperature:
value_template: '{{ (state_attr("climate.thermostat", "current_temperature") | int ) }}'
friendly_name: 'Current Temperature'
unit_of_measurement: '°F'
device_class: temperature
# Difference between max and minimum temperature in the house
ecobee_spread:
friendly_name: 'Temperature Spread'
unit_of_measurement: 'Δ°F'
device_class: temperature
value_template: >-
{% set t = [
states('sensor.lil_bee_temperature'),
states('sensor.office_temperature'),
states('sensor.thermostat_current_temperature'),
] | map('regex_replace', '(^[-+]?[0-9]*\.?[0-9]+$)|.*', '\\1')
| reject('eq', '')
| map('float')
| list %}
{% set spread = t|max - t|min if t else 0 %}
{{ spread | round(2) }}
# Text to speech
tts:
- platform: google_translate
service_name: google_say
# Lutron Caseta
lutron_caseta:
host: !secret LUTRON_CASETA_HOST
keyfile: /ssl/caseta.key
certfile: /ssl/caseta.crt
ca_certs: /ssl/caseta-bridge.crt
# Media Players
media_player:
- platform: onkyo
host: tx-rz820.lan.
name: Downstairs TX-RZ820
sources:
am: Tuner (AM)
aux: AUX
bd-dvd: Bluray (BD/DVD)
bluetooth: Bluetooth
cbl-sat: TiVo (CBL/SAT)
cd: CD
fm: Tuner (FM)
game: Shield (GAME)
net: NET
pc: Chromecast Audio (PC)
phono: PHONO
strm-box: Roku (STRM BOX)
tv: TV
# Switches
switch:
- platform: wake_on_lan
name: Alder PC
host: alder.lan
mac: !secret alder_mac1
- platform: wake_on_lan
name: Tony GW
host: TONY-PC.lan
mac: !secret tony_mac2
- platform: wake_on_lan
name: Karen PC
host: KAREN-PC.lan
mac: !secret karen_mac1
- platform: template
switches:
front_door_lock:
friendly_name: "Front Door"
icon_template: >-
{%- if is_state('lock.kwikset_front_door', 'locked') -%}
mdi:lock-outline
{%- else -%}
mdi:lock-open-outline
{%- endif -%}
value_template: >-
{{ is_state('lock.kwikset_front_door', 'locked') }}
turn_off:
- service: lock.unlock
data_template:
entity_id: lock.kwikset_front_door
turn_on:
- service: lock.lock
data_template:
entity_id: lock.kwikset_front_door
all_audio:
friendly_name: "All Audio"
value_template: >-
{{ is_state('group.media_player_avr', 'on') }}
icon_template: mdi:boombox
turn_off:
- service: homeassistant.turn_off
data_template:
entity_id:
- remote.family_room_harmony_hub
- group.media_player_avr
- group.media_player_cast
turn_on:
- service: homeassistant.turn_on
data_template:
entity_id:
- group.media_player_avr
occupancy:
friendly_name: "Occupancy"
value_template: >-
{{ is_state('switch.all_audio', 'on') or
((states.light
| selectattr('state', 'eq', 'on')
| map(attribute='state')
| list)[0] == 'on'
) or
is_state('group.occupancy_sensors', 'on')
}}
icon_template: mdi:home-assistant
turn_off:
- service: homeassistant.turn_off
data_template:
entity_id:
- switch.all_audio
- service: light.turn_off
data:
entity_id: all
turn_on:
thermostat_fan_mode:
friendly_name: "Thermostat Fan"
value_template: >-
{{- is_state_attr('climate.thermostat_2', 'fan_mode', 'on') or
(state_attr('climate.thermostat_2', 'fan_min_on_time')|int > 5) -}}
icon_template: >-
{%- if is_state_attr('climate.thermostat_2', 'fan_mode', 'on') or
(state_attr('climate.thermostat_2', 'fan_min_on_time')|int > 5) -%}
mdi:fan
{%- else -%}
mdi:fan-off
{%- endif -%}
turn_on:
- service: climate.set_fan_mode
data:
entity_id: climate.thermostat_2
fan_mode: on
turn_off:
- service: climate.set_fan_mode
data:
entity_id: climate.thermostat_2
fan_mode: auto
- service: ecobee.set_fan_min_on_time
data:
entity_id: climate.thermostat_2
fan_min_on_time: 0
# Lights
light:
- platform: group
name: Office Lights
entities:
- light.office_sconce
- light.cree_connected_a_19_60w_equivalent_663b0afe_level_on_off
- platform: template
lights:
switch_front_foyer_chandelier:
friendly_name: Front Foyer_Chandelier
level_template: '{{- 255 if is_state("switch.front_foyer_chandelier", "on") else 0 -}}'
value_template: '{{- is_state("switch.front_foyer_chandelier", "on") -}}'
turn_on:
service: switch.turn_on
entity_id: switch.front_foyer_chandelier
turn_off:
service: switch.turn_off
entity_id: switch.front_foyer_chandelier
set_level:
service_template: 'switch.turn_{{- "off" if brightness == 0 else "on" -}}'
entity_id: switch.front_foyer_chandelier
- platform: template
lights:
switch_front_porch_light:
friendly_name: Front Porch_Light
level_template: '{{- 255 if is_state("switch.front_porch_light", "on") else 0 -}}'
value_template: '{{- is_state("switch.front_porch_light", "on") -}}'
turn_on:
service: switch.turn_on
entity_id: switch.front_porch_light
turn_off:
service: switch.turn_off
entity_id: switch.front_porch_light
set_level:
service_template: 'switch.turn_{{- "off" if brightness == 0 else "on" -}}'
entity_id: switch.front_porch_light
- platform: template
lights:
christmas_tree:
friendly_name: Christmas Tree
level_template: '{{- 255 if is_state("switch.double_plug_left", "on") else 0 -}}'
value_template: '{{- is_state("switch.double_plug_left", "on") -}}'
icon_template: mdi-pine-tree
turn_on:
service: switch.turn_on
entity_id: switch.double_plug_left
turn_off:
service: switch.turn_off
entity_id: switch.double_plug_left
set_level:
service_template: '{{- "switch.turn_" ~ ( "off" if brightness == 0 else "on") -}}'
entity_id: switch.double_plug_left
living_room_floor_lamp:
friendly_name: Living Room Floor Lamp
level_template: '{{- 255 if is_state("switch.double_plug_right", "on") else 0 -}}'
value_template: '{{- is_state("switch.double_plug_right", "on") -}}'
icon_template: mdi-floor-lamp
turn_on:
service: switch.turn_on
entity_id: switch.double_plug_right
turn_off:
service: switch.turn_off
entity_id: switch.double_plug_right
set_level:
service_template: '{{- "switch.turn_" ~ ( "off" if brightness == 0 else "on") -}}'
entity_id: switch.double_plug_right
- platform: template
lights:
switch_kitchen_lights:
friendly_name: Kitchen_Lights
level_template: '{{- 255 if is_state("switch.kitchen_lights", "on") else 0 -}}'
value_template: '{{- is_state("switch.kitchen_lights", "on") -}}'
turn_on:
service: switch.turn_on
entity_id: switch.kitchen_lights
turn_off:
service: switch.turn_off
entity_id: switch.kitchen_lights
set_level:
service_template: 'switch.turn_{{- "off" if brightness == 0 else "on" -}}'
entity_id: switch.kitchen_lights
group: !include groups.yaml
automation: !include automations.yaml
scene: !include scenes.yaml
script: !include scripts.yaml