Skip to content

My homeassistant configuration. Includes automations for ikea lights, changing color based on (dynamic) time of day, multi-stage wake-up light sequence, as well as a polite Telegram bot named Dobby who can turn your lights off when you forgot and send you reminders.

Notifications You must be signed in to change notification settings

fhoekstra/home-assistant-config

Repository files navigation

My Home Assistant configuration

Feel free to use whatever you find here for your own Home Assistant or other home automation.

Use Cases

Includes automations for the following use cases:

  • smart lights:
    • Changing color temperature automatically based on time of day and of year 🐍
    • Turning lights on and off based on motion 🐫
    • Multi-stage wake-up light sequence, interruptable NR_icon_16px 🐫
    • Turning lights off while away from home Telegram_2019_simple_logo 🐫
    • Putting lights in vacation mode, prompted when an appropriate calendar event is detected 📆 🐫
  • other:
    • Reminders for when the washing machine is finished can be scheduled through a button next to the washing machine NR_icon_16px Telegram_2019_simple_logo 🐫
    • The admin user is prompted when there are available updates 🐍 📱

Components

I use the following components to implement this

Devices

  • 1 Raspberry Pi 4B 4GB with Home Assistant OS
  • 1 WD Green 2.5" SATA SSD 120GB, connected with a Startech USB 3.0 to SATA 2.5" adapter
  • ⚡ Phoscon ConBee 2 Zigbee USB gateway
  • ⚡ Zigbee devices:
    • 10 IKEA Trådfri lights (not RGB, but white spectrum 2200 K to 4000 K)
    • 6 IKEA Trådfri remotes with 5 buttons each
    • 1 IKEA Trådfri wireless control outlet
    • 1 IKEA TrådFri on/off remote
    • 1 IKEA TrådFri motion sensor

Integrations

  • deconz for Zigbee connection to smart lights, switch and buttons
  • Telegram_2019_simple_logo Telegram bot for 2-way communication, not limited to the local network
  • 📱 The Home Assistant app for other notifications
  • 📆 Google for the Calendar

Add-ons for automation logic

  • Standard HA YAML (rhymes with 🐫) still has many of my automations, but I intend to move the bigger ones to one of the other platforms:
  • NR_icon_16px Node-Red for flow-based automation
    • Contains all functions of all ⚡ buttons
  • 🐍 AppDaemon for more programmatic automation using Python
    • Contains complex time logic
    • and the programmatic update notification logic

Add-ons, other

  • ⚡ The deconz instance for the Zigbee network
  • Some utility add-ons:
    • VS Code in front-end in browser
    • Samba share for easy access to the machine file from Windows pc

Node-Red demo

Node-Red is a simple yet powerful flow-based automation framework, but sharing what you're doing with it on Github can be difficult, because the json format is not human-readable.

So I decided to take some screenshots of my flows, and show a bit of code.

Main buttons flow in Node-Red

I do 3 things with buttons: "normal" buttons that control lights, a button to set reminders next to the washing machine, and bedroom-specific things like turning off all lights in the evening, or interrupting the wake-up lights sequence in the morning.

Main buttons flow

Especially interesting to share in this, is the first node on the left. It contains the code I have pasted here and decouples the specific codes of the buttons from the logic of my automations.

Wake-up lights flow in Node-Red

This flow toggles and monitors an input_boolean in HA to indicate whether the wake-up lights sequence is, and should be, in progress. The total duration is set in another input in HA, and divided by the number of transitions of ⚡ bulbs to set the transition per bulb. At the end, a switch is used to turn on a very bright white light. Wake-up lights

Resources

To get started with Home Assistant, and for the documentation, visit: https://www.home-assistant.io/getting-started/

To see how other people have been using Home Assistant, have a look at the forums: https://community.home-assistant.io/

About

My homeassistant configuration. Includes automations for ikea lights, changing color based on (dynamic) time of day, multi-stage wake-up light sequence, as well as a polite Telegram bot named Dobby who can turn your lights off when you forgot and send you reminders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published