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
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 | 3 | 23.61 | 70.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 | 172.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 | โฌ1939.53 |
Supervisor add-ons
I run a Supervised install with the following add-ons:
- Docker Container Stats version 1.3.0 by @Poeschl
- Syncthing version 1.8.0 by @Poeschl
- otmonitor version dev by @basnijholt
- Samba NAS version 9.3.0-nas8 by @dianlight
- AdGuard Home version 3.0.0 by @hassio-addons
- AppDaemon 4 version 0.4.4 by @hassio-addons
- Glances version 0.11.1 by @hassio-addons
- Grafana version 6.1.3 by @hassio-addons
- InfluxDB version 4.0.3 by @hassio-addons
- JupyterLab version 0.5.0 by @hassio-addons
- Log Viewer version 0.9.1 by @hassio-addons
- SSH & Web Terminal version 8.0.3 by @hassio-addons
- Visual Studio Code version 3.1.0 by @hassio-addons
- motionEye version 0.11.0 by @hassio-addons
- phpMyAdmin version 0.2.0 by @hassio-addons
- File editor version 5.2.0 by @home-assistant
- Let's Encrypt version 4.11.0 by @home-assistant
- MariaDB version 2.2.2 by @home-assistant
- Mosquitto broker version 5.1.1 by @home-assistant
- deCONZ version 6.7.2 by @home-assistant
- Home Assistant Google Drive Backup version 0.103.1 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
โ (10 automations) - Arriving
๐ (1 automations) - Climate
๐ฅ ๐ฅถ (6 automations) - Control switches
๐ (6 automations) - Cube โ (2 automations)
- Doorbell
๐ช ๐ (1 automations) - Frontend
๐จโ๐ป (3 automations) - KEF DSP
๐ ๐ (12 automations) - Leaving
๐ (4 automations) - Light
๐ก (19 automations) - Lovelace
๐จโ๐ป (1 automations) - LSX
๐ (2 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)
Adaptive lighting ๐ ๐
Turn on and off switches
which uses:
Reset manual_control after 1 hour
Notify manual_control
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
Apple Watch โ
Play or Pause the TV
Minimal lights bedroom
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
Send vacuum cleaner
which uses:
Movie time
Reset adaptive lighting
which uses:
Set temperature
Where is other person?
Arriving ๐
Switch music from iPhone to speakers if no one is home
which uses:
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_low_temperature
- binary_sensor.no_one_home
Turn on heating again after notification
which uses:
Set outside temperature every hour
Warning when heating on and living room door open
which uses:
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
Cube โ
Perform operation
which uses:
Rotate the cube
which uses:
Doorbell ๐ช ๐
Click the button
Frontend ๐จโ๐ป
Turn on dark mode
which uses:
Turn on light mode
which uses:
Change theme
which uses:
KEF DSP ๐ ๐
Sync desk_db
which uses:
Sync wall_db
which uses:
Sync treble_db
which uses:
Sync high_hz
which uses:
Sync low_hz
which uses:
Sync sub_db
which uses:
Sync sub_polarity
which uses:
Sync bass_extension
which uses:
Sync desk_mode
which uses:
Sync wall_mode
which uses:
Sync phase_correction
which uses:
Sync high_pass
which uses:
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:
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
Lovelace ๐จโ๐ป
Convert lovelace.json to lovelace-ui.yaml
which uses:
LSX ๐
Sync volume
which uses:
Sync source
which uses:
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
Music ๐ต
Start playlist
which uses:
Switch music from iPhone to speakers if coming home
which uses:
Notifications ๐
Marcella arrived at Rotterdam Centraal
Plant ๐ฑ
Problem with Ficus microcarpa Ginseng
which uses:
Problem with Kentia Palm
which uses:
Problem with Yucca Elephantipes
which uses:
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:
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:
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
Test ๐งช
Listen to Adaptive Lighting events
Time
Flash lights
Call update_entity after light.turn_on/turn_off
Utilities ๐งบ ๐ ๐ฝ
Washing machine or dishwasher started or finished
which uses:
Washing machine notification
which uses:
Dishwasher notification
which uses:
Vacation mode ๐
Auto turn on
which uses:
Auto turn off
which uses:
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
Work ๐ผ
Go home notification
which uses:
Reset input_boolean at midnight
which uses: