home-assistant-config
home-assistant-config copied to clipboard
Home Assistant config files, rewritten to use the latest features, 100+ documented automations, automatically generated ToC :house: :robot:
Bas Nijholt's Home Assistant config files
Using my iOS Light and Dark Mode Themes.
See also my guide for my girlfriend ❤️.
Table of content
- My devices
- Supervisor add-ons
- All my automations
Noteworthy (useful) automations
See all my automations and its dependencies down the page!
- Alarm clock that uses the AppDaemon volume ramp and sunrise app ⏰
-
Automatic
lovelace.json
tolovelace-ui.yaml
converter for version control 🤖 - Controlling music and lights (hue and brightness) using the Xiaomi Aqara Magic Cube ∛
- Controlling the lights using Phillips Hue Dimmers the Xiaomi Aqara Smart Switches 🎛
- Automated lights 💡
- Presence detection in different rooms based on various binary template sensors
- Robot vacuum automations 🧹
- Arriving and leaving automations
- Notifications when the dishwasher or washing machine is done
- Time at work 📈 tracking and notifications to go home
- Using HA-Menu to control my speakers on my iMac
- Using home-assistant-macbook-touch-bar to control HA on my MacBook Pro's Touch Bar 💻
- Automatically switch Lovelace's theme between backgrounds and light/dark mode
- Sync volume TV ⇄ speakers 🔊
- Security notifications when the front door 🚪 has been open for too long or motion is detected when no one is home
My cool AppDaemon apps
- Sunrise emulator app 🌅
- Wake up with Spotify app that slowly ramps the volume 📢
- Low Battery level notifications 🔋
Popular Reddit posts of features in this config
(Sorted from new to old)
- Advanced control from my Apple Watch using single automations: setting lights, vacuum, temperature, sleep mode, and more!
- HA has it before Apple has even finished it, I present: Adaptive_lighting! flux/circadian_lighting fans (haters?) please try the new UI configurable component that stops automatically adjusting your lights when you make a manual change 🎉 (and many more new useful features!)
- Creating useful notifications using the new 'variables' and 'wait_for_trigger' features
- Copying YAML from GitHub is easier than ever: my config's README now automatically lists all automations (and entities it uses) with links to the relevant parts in the YAML
- Beautiful iOS dark and light mode inspired themes with easy background switch (that now also change the top header color!) [OC]
- Finally a good use for the touch bar on my Macbook Pro!
- 100% control over my high fi speakers: a bidirectional synchronized equalizer
- COVID-19 forcing me to stay inside? Check out my "quarantine-o-meter" that displays how much time (in %) we've been inside.
- After a lot of love, a much-requested feature (+more!) for my iOS Dark Theme [OC]
- I can now sync the speaker volume using the menu bar of my iMac! [OC]
- I keep seeing my own theme on Reddit, so now it's my turn! [OC]
Ideas?
- Notify us when the window is open and it is raining.
- Add budget keeper using the Bunq API
My devices
Switches 🎚 | Units (#) | Price per unit (€) | Price (€) |
---|---|---|---|
TP-Link HS110 | 1 | 35.84 | 35.84 |
Xiaomi Aqara Magic Cube | 1 | 11.08 | 11.08 |
Xiaomi Aqara Single Button | 4 | 14.35 | 57.38 |
Philips Hue Dimmer switch | 2 | 16.61 | 33.22 |
Total | 137.52 | ||
Sensors 🌡 | Units (#) | Price per unit (€) | Price (€) |
Xiaomi Aqara Door Sensor | 4 | 8.18 | 32.71 |
Xiaomi Aqara Temperature Sensor | 5 | 9.15 | 45.74 |
Xiaomi Aqara Motion Sensor | 10 | 9.79 | 97.85 |
Xiaomi Aqara Vibration Sensor | 1 | 11.59 | 11.59 |
Xiaomi Mi Flora | 3 | 15.54 | 46.63 |
Total | 234.52 | ||
Vacuum 🧹 | Units (#) | Price per unit (€) | Price (€) |
Xiaomi Mi Roborock S5 | 1 | 294.31 | 294.31 |
Total | 294.31 | ||
Media player 📺🔈 | Units (#) | Price per unit (€) | Price (€) |
KEF LS50 Wireless speakers | 1 | nan | nan |
KEF LSX speakers | 1 | nan | nan |
LG OLED 55 C9 | 1 | nan | nan |
Lights 💡 | Units (#) | Price per unit (€) | Price (€) |
Philips Hue E27 White and Color | 12 | 22.22 | 266.7 |
Philips Hue E14 White and Color | 2 | 34.88 | 69.77 |
Philips Hue GU10 Ambient White | 5 | 18.54 | 92.7 |
Philips Hue Go | 1 | 57.05 | 57.05 |
Philips Hue LED strip 2m | 2 | 43.2 | 86.39 |
Philips Hue LED strip 1m | 1 | 13.84 | 13.84 |
Total | 586.45 | ||
Hubs 🌎 | Units (#) | Price per unit (€) | Price (€) |
ConBee II | 1 | 39.95 | 39.95 |
Total | 39.95 | ||
Server 🖥 | Units (#) | Price per unit (€) | Price (€) |
Intel NUC Kit NUC8i3BEH | 1 | 278.3 | 278.3 |
8 GB Crucial CT8G4SFS824A DDR4 | 2 | 25.52 | 51.04 |
Samsung 970 EVO M.2 500GB | 1 | 94.99 | 94.99 |
Raspberry Pi 4, 4GB RAM (connected to power/gas meter and connected over MQTT to main HA instance) | 1 | 70.9 | 70.9 |
Raspberry Pi 4 FLIRC Case | 1 | 25.85 | 25.85 |
SanDisk Ultra microSDHC Memory Card 32GB | 1 | 6.99 | 6.99 |
Total | 528.07 | ||
Device tracker 🔍 | Units (#) | Price per unit (€) | Price (€) |
iPhone X with the iOS app | 1 | nan | nan |
iPhone SE2 with the iOS app | 1 | nan | nan |
Other | Units (#) | Price per unit (€) | Price (€) |
PlayStation Eye Webcam and Microphone array | 1 | 14.95 | 14.95 |
DSMR - Slimme Meter kabel | 1 | 19.95 | 19.95 |
Nodo-Shop – OpenTherm Gateway (OTGW) with NodeMCU | 1 | 48.81 | 48.81 |
Total | 83.71 | ||
Total | €1904.53 |
Supervisor add-ons
I run a Supervised install with the following add-ons:
- Docker Container Stats version 1.5.0 by @Poeschl
- Syncthing version 1.14.0 by @Poeschl
- AppDaemon version 0.8.2 by @hassio-addons
- Glances version 0.15.0 by @hassio-addons
- Grafana version 7.5.2 by @hassio-addons
- InfluxDB version 4.4.1 by @hassio-addons
- Log Viewer version 0.13.0 by @hassio-addons
- SSH & Web Terminal version 10.1.1 by @hassio-addons
- Studio Code Server version 4.2.0 by @hassio-addons
- motionEye version 0.18.0 by @hassio-addons
- phpMyAdmin version 0.7.1 by @hassio-addons
- File editor version 5.3.3 by @home-assistant
- Let's Encrypt version 4.12.0 by @home-assistant
- MariaDB version 2.4.0 by @home-assistant
- Mosquitto broker version 6.0.1 by @home-assistant
- Samba share version 9.5.1 by @home-assistant
- deCONZ version 6.12.0 by @home-assistant
- Home Assistant Google Drive Backup version 0.106.2 by @sabeechen
- Rhasspy Assistant 2.5 version 2.5.7.2 by @synesthesiam
Automations - Table of Content
- Adaptive lighting 🌄🌇 (3 automations)
- Alarm clock ⏰ (1 automations)
- Apple Watch ⌚ (12 automations)
- Arriving 👞 (1 automations)
- Climate 🔥🥶 (6 automations)
- Control switches 🎛 (6 automations)
- Cube ∛ (2 automations)
- Doorbell 🚪🔔 (1 automations)
- Frontend 👨💻 (3 automations)
- Leaving 👞 (4 automations)
- Light 💡 (19 automations)
- Lovelace 👨💻 (1 automations)
- Media player 🔈📺 (6 automations)
- Music 🎵 (2 automations)
- Notifications 🔔 (1 automations)
- Plant 🌱 (3 automations)
- Security 👮🚨 (4 automations)
- Night mode 🌕🌑 (5 automations)
- System 🖥 (7 automations)
- Test 🧪 (4 automations)
- Utilities 🧺👚🍽 (3 automations)
- Vacation mode 🏝 (2 automations)
- Vacuum 🧹 (6 automations)
- Work 💼 (3 automations)
⚠️ Total number of automations: 105 ⚠️
Adaptive lighting 🌄🌇
Turn on and off switches
which uses:
Reset manual_control after 1 hour
Notify manual_control
^ toc
Alarm clock ⏰
Wake up with Spotify and light
which uses:
- input_boolean.alarm_clock
- input_boolean.wake_up_light
- input_boolean.wake_up_with_spotify
- input_select.sleep_mode
- sensor.ten_minutes_before_alarm
^ toc
Apple Watch ⌚
Play or Pause the TV
Minimal lights bedroom
Fix TV sound
which uses:
Set sleep mode
which uses:
Set lights
which uses:
- script.cozy_lights_bedroom
- script.cozy_lights_living_room
- script.turn_on_lights
- script.white_lights_living_room
Temperature report
Portfolio value
Send vacuum cleaner
which uses:
Movie time
Reset adaptive lighting
which uses:
Set temperature
Where is other person?
^ toc
Arriving 👞
Switch music from iPhone to speakers if no one is home
which uses:
^ toc
Climate 🔥🥶
Turn on the heating 30 min before waking up
which uses:
- input_boolean.alarm_clock
- input_boolean.automatic_temperature
- script.set_high_temperature
- sensor.half_hour_before_alarm
Turn on the heating when going home
which uses:
- input_boolean.automatic_temperature
- input_number.temperature_high
- script.set_high_temperature
- binary_sensor.no_one_home
Turn off the heating at 22:00
which uses:
- input_boolean.automatic_temperature
- input_number.temperature_low
- script.set_high_temperature
- script.set_low_temperature
- binary_sensor.no_one_home
Set outside temperature every hour
Warning when heating on and living room door open
which uses:
Set temperature setpoint to 50 °C
^ toc
Control switches 🎛
Living room Philips Hue dimmer switch
which uses:
- input_select.last_script_living_room
- script.increase_brightness
- script.next_colors
- script.white_lights_living_room
Bedroom Philips Hue dimmer switch
which uses:
- input_select.last_script_bedroom
- script.increase_brightness
- script.next_colors
- script.white_lights_bedroom
Living room Aqara Wireless Mini Switch
which uses:
Bedroom Aqara Wireless Mini Switch
which uses:
- input_select.last_script_bedroom
- input_select.sleep_mode
- script.increase_brightness
- script.next_colors
- script.turn_off_everything
- sensor.ten_minutes_before_alarm
Bathroom Aqara Wireless Mini Switch
which uses:
Downstairs Aqara Wireless Mini Switch
which uses:
- script.arriving
- script.set_low_temperature
- script.start_spotify
- script.turn_off_everything_non_automatic
- sensor.favorite_playlist_of_nearest_person
^ toc
Cube ∛
Perform operation
which uses:
Rotate the cube
which uses:
^ toc
Doorbell 🚪🔔
Click the button
^ toc
Frontend 👨💻
Turn on dark mode
which uses:
Turn on light mode
which uses:
Change theme
which uses:
^ toc
Leaving 👞
Automatically turn off everything
which uses:
- input_boolean.guest_mode
- script.leaving
- binary_sensor.anything_on
- binary_sensor.no_one_home
- binary_sensor.someone_in_the_house_in_last_hour
Ask to turn off everything
which uses:
Turn off everything after notification
which uses:
Downstairs Aqara Wireless Mini Switch
which uses:
^ toc
Light 💡
Turn on living room
which uses:
Turn off living room
which uses:
Toggle kitchen ceiling
which uses:
Turn on kitchen counter if sleep mode is off
which uses:
Turn off kitchen counter
which uses:
Toggle bathroom
which uses:
Toggle toilet
which uses:
Turn on hall
which uses:
Turn off hall
which uses:
Automatically turn on the bedroom
which uses:
- input_boolean.automatic_bedroom_lights
- input_boolean.bedroom_lights_automatically_turned_on
- input_select.sleep_mode
- script.turn_on_lights
- binary_sensor.activity_in_bedroom
Automatically turn off the bedroom
which uses:
- input_boolean.automatic_bedroom_lights
- input_boolean.bedroom_lights_automatically_turned_on
- binary_sensor.activity_in_bedroom
Turn off bedroom lights auto switch
which uses:
Turn on automatic_bedroom_lights switch
which uses:
Turn off bedroom after 2 hours of inactivity
which uses:
Turn off toilet (extra check)
In case the other automation failed
which uses:
Turn off bathroom (extra check)
In case the other automation failed
which uses:
Turn off kitchen (extra check)
In case the other automation failed
which uses:
Turn off hall (extra check)
In case the other automation failed
which uses:
Turn off bedroom (extra check)
In case the other automation failed
which uses:
- input_boolean.automatic_bedroom_lights
- input_boolean.bedroom_lights_automatically_turned_on
- binary_sensor.activity_in_bedroom
^ toc
Lovelace 👨💻
Convert lovelace.json to lovelace-ui.yaml
which uses:
^ toc
Media player 🔈📺
Turn on Opt when TV is on and Spotify is not playing and not Usb
The speaker is connected via an optical cable to the TV. Whenever the speakers aren't playing Spotify (via WiFi) directly, switch the source of the speakers to "Opt".
Turn off speakers when turning off TV
If speakers off and TV on, turn on the speaker on TV state change
Update Spotify entity when TV is on every 5 seconds
Sync KEF LS50 and TV volume
Automatically turn off TV and speakers after two hours of inactivity
^ toc
Music 🎵
Start playlist
which uses:
Switch music from iPhone to speakers if coming home
which uses:
^ toc
Notifications 🔔
Marcella arrived at Rotterdam Centraal
^ toc
Plant 🌱
Problem with Calathea
which uses:
Problem with Monstera
which uses:
Problem with Peace lily
which uses:
^ toc
Security 👮🚨
Motion detected but we are not home
which uses:
Door has been open for more than 5 minutes
which uses:
No one is home but high power usage
which uses:
Office door has opened
which uses:
^ toc
Night mode 🌕🌑
Automatically turn off when alarm turns off or at 7AM
which uses:
Turn off automatic bedroom lights
which uses:
Set low temperature when sleep mode turns on
which uses:
Go from half to total sleeping mode
When it is half sleeping mode and there is no activity in the house for more than an hour go to total sleeping mode.
which uses:
Set sleeping mode in the living room
Set the living room lights to sleep mode only when no-one is there anymore.
which uses:
^ toc
System 🖥
Warning about high CPU usage
Warning about high CPU temperature
Warning about high Xbox temperature
Update DNS
Update the DNS at Gandi to point my domain to my Home Assistant instance.
which uses:
Run chores
Run shell and Python scripts in utils folder.
which uses:
MQTT sensors are not updating
Check whether we are receiving messages over MQTT from my other HA instance.
Battery level low
^ toc
Test 🧪
Listen to Adaptive Lighting events
Time
Flash lights
Call update_entity after light.turn_on/turn_off
^ toc
Utilities 🧺👚🍽
Washing machine or dishwasher started or finished
which uses:
Washing machine notification
which uses:
Dishwasher notification
which uses:
^ toc
Vacation mode 🏝
Auto turn on
which uses:
Auto turn off
which uses:
^ toc
Vacuum 🧹
Started cleaning
Stopped cleaning
which uses:
Reminder notification
which uses:
Cleanup if nobody is home
which uses:
- input_boolean.cleaned_today
- input_boolean.guest_mode
- input_boolean.vacation_mode
- binary_sensor.vacuum_day
- group.persons
Reset cleaned today
which uses:
Reset to standard mode
^ toc
Work 💼
Go home notification
which uses:
Reset input_boolean at midnight
which uses:
Bas left work notification for Marcella
^ toc