-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.yaml
277 lines (237 loc) · 7.26 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
# Create Docker Container
# sudo docker run --restart=always -d --name="home-assistant" -v /volume1/docker/home_assistant:/config --device=/dev/ttyUSB-ZStick-5G:/dev/ttyUSB-ZStick-5G -e TZ=America/Detroit --net=host homeassistant/home-assistant
# Example theme
# https://github.com/isabellaalstrom/home-assistant-config/blob/master/configuration.yaml
homeassistant:
latitude: !secret latitude
longitude: !secret longitude
elevation: !secret elevation
unit_system: imperial
time_zone: America/Detroit
auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- !secret trusted_network_1
auth_mfa_modules:
- type: totp
# Customization file
customize: !include customize.yaml
system_health:
# Enables the frontend
frontend:
themes: !include_dir_named themes
# Enables configuration UI
config:
lovelace:
mode: yaml
http:
base_url: !secret base_url
ssl_certificate: /config/ssl/cert.pem
ssl_key: /config/ssl/privkey.pem
use_x_forwarded_for: true
# https://community.home-assistant.io/t/trusted-networks-when-using-nginx-reverse-proxy/37836/7
trusted_proxies:
- 127.0.0.1 # local host
- ::1 # All IPv6 that have leading zeros and end with 1
# - 192.168.86.0/24 # IP/netmask, where the first 24 bits are the subnet. 192.168.0 is a common default subnet for households.
ip_ban_enabled: true
login_attempts_threshold: 5
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
logger:
default: info
# Discover some devices automatically
discovery:
ignore:
- apple_tv
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Text to speech
tts:
- platform: google_translate
# Redirect output to Synology NAS Maria DB
recorder:
db_url: !secret mariadb_url
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
rf_mqtt:
sub_topic: rtl_433/#
pub_topic: debounced
debounce:
- motion: 3
weather:
- platform: darksky
api_key: !secret darksky_api_key
alarm_control_panel:
- platform: manual
code: !secret alarm_code
# Weather prediction
sensor:
- platform: yr
- platform: google_wifi
- platform: aarlo
monitored_conditions:
- captured_today
- last_capture
- total_cameras
- battery_level
- signal_strength
- platform: authenticated
- platform: template
sensors:
occupancy_state:
value_template: >-
{% if is_state('input_boolean.people_home', 'on') %}
Home
{% else %}
Away
{% endif %}
icon_template: >-
{% if is_state('input_boolean.people_home', 'on') %}
mdi:home
{% else %}
mdi:walk
{% endif %}
friendly_name: 'Occupancy'
binary_sensor:
- platform: aarlo
monitored_conditions:
- motion
- sound
- platform: template
sensors:
can_use_thermal_energy:
friendly_name: "Can Use Thermal Energy"
value_template: >-
{% set forecast = state_attr("weather.dark_sky", "forecast") %}
{% set vars = namespace(canCoolNaturally=true, canHeatNaturally=true) %}
{% set desired_temp = state_attr("climate.living_room", "temperature") %}
{% set isCool = is_state("climate.living_room", "cool") or is_state("climate.living_room", "auto") %}
{% set isHeat = is_state("climate.living_room", "heat") or is_state("climate.living_room", "auto") %}
{% for item in forecast[0:5] %}
{%- if item.temperature > desired_temp or not isCool %}
{% set vars.canCoolNaturally = false %}
{%- endif -%}
{%- if item.temperature < desired_temp or not isHeat %}
{% set vars.canHeatNaturally = false %}
{%- endif -%}
{% endfor %}
{{ vars.canCoolNaturally or vars.canHeatNaturally }}
input_boolean:
people_home:
name: Home
icon: mdi:account
windows_open:
name: Windows Are Open
scene:
- name: Lock Up
entities:
group.all_locks: lock
group.all_covers: close_cover
- name: Power Down
entities:
group.all_lights: off
switch.living_room: off
# Media
media_player:
- platform: plex
- platform: onkyo
host: !secret onkyo_receiver_ip
name: receiver
sources:
network: 'Airplay'
video1: 'DVD Player'
video4: 'Wii-U'
video3: 'Apple TV'
- platform: vizio
host: !secret vizio_tv_ip
access_token: !secret vizio_tv_access_token
# ====================================
# Communication Technologies
# ====================================
# Z-Wave
zwave:
# Create symlink to USB device
# https://www.domoticz.com/wiki/PersistentUSBDevices
# Create docker image while enabling UDEV
# https://forums.balena.io/t/docker-container-cannot-access-dynamically-plugged-usb-devices/4277/13
# TRY THIS!
# https://community.home-assistant.io/t/mapping-z-wave-dongle-to-docker-homeassistant/63044/2
usb_path: /dev/ttyUSB-zwave
network_key: !secret zwave_network_key
zha:
usb_path: /dev/ttyUSB-zigbee
database_path: /config/zigbee.db
# ====================================
# Third party services
# ====================================
google_assistant: !include assistants/google.yaml
# Example configuration.yaml entry
ios:
push:
categories:
- name: Alarm
identifier: 'alarm'
actions:
- identifier: 'SOUND_ALARM'
title: 'Sound Alarm'
activationMode: 'background'
authenticationRequired: yes
destructive: yes
behavior: 'default'
- identifier: 'SILENCE_ALARM'
title: 'Silence Alarm'
activationMode: 'background'
authenticationRequired: yes
destructive: no
behavior: 'textInput'
textInputButtonTitle: 'Silencio!'
textInputPlaceholder: 'Placeholder'
- name: Conserve Energy
identifier: 'conserve_energy'
actions:
- identifier: 'YES_ACTION'
title: 'Yes'
activationMode: 'background'
authenticationRequired: yes
behavior: 'default'
- identifier: 'NO_ACTION'
title: 'No'
activationMode: 'background'
authenticationRequired: yes
homekit: !include assistants/homekit.yaml
aarlo:
username: !secret arlo_userename
password: !secret arlo_password
hacs:
token: !secret github_access_token
camera:
- platform: aarlo
ffmpeg_arguments: '-pred 1 -q:v 2'
stream:
nest:
client_id: !secret nest_client_id
client_secret: !secret nest_client_secret
rachio:
api_key: !secret rachio_api_key
panel_iframe:
rachio:
title: Rachio
url: "https://app.rach.io"
icon: mdi:water-pump
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml