· 5 years ago · Nov 15, 2019, 12:36 PM
1# Configure a default setup of Home Assistant (frontend, api, etc)
2default_config:
3
4# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
5#http:
6# base_url: winkel.internet-box.ch:8123
7# ssl_certificate: /etc/letsencrypt/live/winkel.internet-box.ch/fullchain.pem
8# ssl_key: /etc/letsencrypt/live/winkel.internet-box.ch/privkey.pem
9
10discovery:
11 ignore:
12 - google_cast
13
14# Text to speech
15tts:
16 - platform: google_translate
17
18group: !include groups.yaml
19automation: !include automations.yaml
20script: !include scripts.yaml
21
22#Enable frontend themes
23frontend: !include frontend.yaml
24
25### Integrations // Devices
26
27#netatmo weather station
28netatmo:
29 api_key: !secret netatmo_api_key
30 secret_key: !secret netatmo_secret_key
31 username: !secret netatmo_username
32 password: !secret netatmo_password
33
34
35#Xiaomi vacuum
36vacuum:
37 - platform: xiaomi_miio
38 host: 192.168.1.30
39 token: !secret xiaomi_token
40
41
42# Harmony Hub
43remote:
44 - platform: harmony
45 name: Living room
46 host: 192.168.1.100
47
48### iOS notifications
49ios:
50 push:
51 categories:
52 - name: Notification
53 identifier: 'Notification'
54 actions:
55 - identifier: 'Notification'
56 title: 'Notification'
57
58
59### homekit
60homekit:
61 auto_start: false
62 filter:
63 include_domains:
64 - cover
65 include_entities:
66 - light.livingroom_dinningtable
67 - light.hue_go
68 - light.livingroom_lights
69 - light.office
70 - light.bedroom_mainlights
71 - light.tv_area_spots
72 - switch.bedroom_bedside_lights
73 - light.bedroom_mainlights
74 - light.bedroom_lightstrip_bed
75 - fan.xiaomi_fan
76 - sensor.netatmo_outside_temperature
77 - sensor.netatmo_living_room_temperature
78 - light.bedroom
79 - binary_sensor.corridor_frontdoor_access_control
80 - binary_sensor.livingroom_sensor_terrace_2
81 - binary_sensor.livingroom_sensor_front_2
82 - switch.watch_apple_tv
83
84
85### Device grouping
86light:
87 - platform: group
88 name: TV Area spots
89 entities:
90 - light.livingroom_huespot_1
91 - light.livingroom_huespot_2
92 - light.livingroom_huespot_3
93 - light.livingroom_huespot_4
94 - platform: group
95 name: Hue Go
96 entities:
97 - light.livingroom_hue_go_1
98 - light.livingroom_hue_go_2
99 - platform: group
100 name: Livingroom Lights
101 entities:
102 - light.living_room
103 - light.livingroom_dinningtable
104 - light.livingroom_hue_go_1
105 - light.livingroom_hue_go_2
106 - platform: group
107 name: Bedroom
108 entities:
109 - light.bedroom_lightstrip_bed
110 - light.bedroom_mainlights
111 - light.bedroom_bedsidelights
112 - platform: group
113 name: All Lights
114 entities:
115 - light.bedroom
116 - light.living_room
117 - light.office
118
119# the below converts the switch into a light, to allow it to be grouped
120 - platform: switch
121 name: Bedroom_Bedsidelights
122 entity_id: switch.bedroom_bedside_lights
123
124sensor:
125 - platform: template
126 sensors:
127 remote_activity:
128 friendly_name: "Remote activity"
129 value_template: "{{ state_attr('remote.living_room', 'current_activity') }}"
130
131switch:
132 - platform: template
133 switches:
134 watch_apple_tv:
135 friendly_name: Watch Apple TV
136 value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Watch Apple TV') }}"
137 turn_on:
138 service: remote.turn_on
139 data:
140 entity_id: remote.living_room
141 activity: 'Watch Apple TV'
142 turn_off:
143 service: remote.turn_off
144 data:
145 entity_id: remote.living_room
146 activity: 'PowerOff'
147
148
149# Xiaomi HomeKit The below is required to allow the Xiaomi Vacuum to emulate a fan for homekit to see it
150fan:
151 - platform: template
152 fans:
153 xiaomi_fan:
154 friendly_name: "Xiaomi Vacuum"
155 value_template: "{%if states('vacuum.xiaomi_vacuum_cleaner') == 'cleaning' %}on{%elif states('vacuum.xiaomi_vacuum_cleaner') == 'paused' %}on{%else %}off{% endif %}"
156 speed_template: "{{ state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed') }}"
157 turn_on:
158 service: vacuum.start
159 entity_id: vacuum.xiaomi_vacuum_cleaner
160 turn_off:
161 service: vacuum.return_to_base
162 entity_id: vacuum.xiaomi_vacuum_cleaner
163 set_speed:
164 service: vacuum.set_fan_speed
165 data_template:
166 fan_speed: "{{ speed }}"
167 entity_id: vacuum.xiaomi_vacuum_cleaner
168 speeds:
169 - 'off'
170 - '25'
171 - 'Balanced'
172 - '75'
173 - '100'
174
175#Binary Sensor configuration
176binary_sensor:
177 - platform: workday
178 country: CH
179 province: ZH
180 - platform: template
181 sensors:
182 corridor_frontdoor_access_control:
183 device_class: door
184 friendly_name: 'Front Door'
185 value_template: "{{ is_state('sensor.corridor_frontdoor_access_control', '22') }}"
186 - platform: template
187 sensors:
188 livingroom_sensor_front:
189 device_class: door
190 friendly_name: 'Front Window'
191 value_template: "{{ is_state('binary_sensor.livingroom_sensor_front', 'on') }}"
192 - platform: template
193 sensors:
194 livingroom_sensor_terrace:
195 device_class: door
196 friendly_name: 'Terrace Window'
197 value_template: "{{ is_state('binary_sensor.livingroom_sensor_terrace', 'on') }}"
198
199
200#ZWave configuration to allow inverting of the roller shutter (up=down)
201zwave:
202 device_config:
203 cover.roller_shutter_terrace:
204 invert_openclose_buttons: true
205 cover.roller_shutter_tv:
206 invert_openclose_buttons: true
207 cover.roller_shutter_window:
208 invert_openclose_buttons: true
209 cover.roller_shutter_side:
210 invert_openclose_buttons: true
211 cover.roller_shutter_door:
212 invert_openclose_buttons: true
213
214
215# Entities to include in history
216history:
217 include:
218 domains:
219 - sun
220 - weather
221 - light
222 - switch
223 - cover
224 - device_tracker
225 - media_player
226
227 - vacuum
228 entities:
229# batteries
230 - sensor.aeon_labs_zw112_door_window_sensor_6_battery_level_2
231 - sensor.fibaro_system_fgdw002_door_opening_sensor_2_battery_level
232 - sensor.netatmo_living_room_battery_percent
233 - sensor.netatmo_outside_battery
234 - sensor.netatmo_outside_battery_percent
235 - sensor.netatmo_rain_gauge_battery
236# power
237 - sensor.aeon_labs_zw075_smart_switch_gen5_power
238 - sensor.fibaro_system_fgd212_dimmer_2_power
239 - sensor.fibaro_system_fgd212_dimmer_2_power_2
240 - sensor.fibaro_system_fgrm222_roller_shutter_controller_2_power
241 - sensor.fibaro_system_fgrm222_roller_shutter_controller_2_power_2
242# humidity
243 - sensor.netatmo_bedroom_humidity
244 - sensor.netatmo_living_room_humidity
245 - sensor.netatmo_outside_humidity
246# temperature
247 - sensor.fibaro_system_fgdw002_door_opening_sensor_2_temperature
248 - sensor.netatmo_bedroom_temperature
249 - sensor.netatmo_living_room_temperature
250 - sensor.netatmo_outside_temperature
251# C02
252 - sensor.netatmo_bedroom_co2
253 - sensor.netatmo_living_room_co2
254# noise
255 - sensor.netatmo_bedroom_noise
256# barometric pressure
257 - sensor.netatmo_bedroom_pressure
258# rain
259 - sensor.netatmo_rain_gauge_rain
260 - sensor.netatmo_rain_gauge_sum_rain_1
261 - sensor.netatmo_rain_gauge_sum_rain_24
262# binary sensor
263 - binary_sensor.livingroom_sensor_front_2
264 - binary_sensor.corridor_frontdoor_access_control
265 - binary_sensor.livingroom_sensor_terrace_2
266 exclude:
267 entities:
268 - light.bedroom
269 - device_tracker.gaming_pc
270 - device_tracker.njbja2pd0nv2
271 - light.group_for_wakeup_2
272 - light.group_for_wakeup
273
274#Unifi controller
275device_tracker:
276 - platform: unifi
277 host: 192.168.1.22
278 username: !secret unifi_user
279 password: !secret unifi_password
280 consider_home: 180