Skip to content

My Home Assistant configuration. More info at www.home-assistant.io or in the readme below.

Notifications You must be signed in to change notification settings

hmmbob/HomeAssistantConfig

Repository files navigation

This repo contains my Home Assistant configuration. Home Assistant is open source home automation that puts local control and privacy first. More information can be found at their website, https://www.home-assistant.io.

I started with Home Assistant back in 2018 somewhere, running it in a Python venv directly at a Raspbian installation. I ran into all kind of compatibility issues in the long run, so I decided to switch to a Docker based setup in July 2019. Ever since starting with my home automation project, I've been making changes weekly and sometimes daily. However, I don't always commit directly to Github (sorry...) so changes may flow in a bit slower. In April 2020 I completely rebuild my Lovelace setup.

My Home Automation Vision

My vision is that my Home Automation should always work, even when the internet is down and always should have a manual backup. The house should still be fully functional for me, the others living with me but also my non-tech grandma. That results into choosing solutions that don't use cloud services if not necesarry and that all lights still can always be switched manually. Therefore I use Qubino Zwave modules, enabling me to switch lights manually and 'smart', and some ESPhome flashed Sonoff modules, which also come with a push button to switch the relays. A notable exception to this is the Google Assistant integration, which obviously requires a connection to Google.

My Home Assistant Infrastructure

Main Hub

Hardware

Software

Connected devices

I use a combination of Z-Wave, Zigbee and Wifi in my setup:

Z-Wave

Wifi Switches

  • 2x Sonoff basic switches running ESPhome (so no connection with China!)
  • 2x Sonoff S20 switches also running ESPhome, 1 in use, 1 in spare for the Christmas lights.

Zigbee sensors & switches

  • 2x Xiaomi mijia Temperature Humidity Sensor, 1 in the attic, the other in the main bedroom
  • 2x Xiaomi door Window Sensor, 1 is used at the freezer upstairs because the kids tend to leave it not fully closed. The other is installed at the front door. Both are used to warn if the door has been open for over 2 minutes.
  • 2x Innr SP120 Smart plugs with power metering. One is used for a reading light with the kids - not to actually switch the power but to measure if the light is on after bedtime :) I'll find a reason to use the other one soon :)
  • 2x Blitzwolf BW-SHP13 Smart Plugs. Both are used to improve the Zigbee network quality (and to get rid of my IKEA signal repeater): one is in the living room switching one of the lights there - close to the Zigbee controller. The other one is on the first floor and actually only plugged in, until I find something better to do with it :)

Thermostat

Cast & Voice Control

  • Google Home Hub in the living room
  • AndroidTV in the living room TV
  • Philips TAB8805/12 Soundbar with built-in cast in the living room
  • Google Home in the study room
  • 2x Google Home Mini upstairs
  • Google Chromecast in my bedroom TV

Weather sensor

In the summer of 2020 my oldest (10) and I decided to build a small weather sensor. As the standard building instructions were using some ugly housing options, we decided to go with a small bird house to put the sensors in. I made a short write-up on what we did at Tweakblogs, also explaining how we use Home Assistant to push the weather data to the APIs of Luftdaten/Sensor.Community and OpenSenseMap: https://hmmbob.tweakblogs.net/blog/18950/push-data-to-luftdaten-and-opensensemap-with-home-assistant. It has pictures too 😄

The weather sensor uses:

  • NodeMCU, flashed with ESPHome
  • SDS011 Particle Matter sensor
  • BME280 Temperature / Pressure / Humidity sensor

My actual Home Assistant configuration choices

Presence detection

Presence detection is always an important issue with Home Automation, and I've struggled with it too. Recently I stepped away from using a combination of Owntracks and bluetooth tracking (I used Monitor) in favor of the official Home Assistant app, because this combination was not robust enough. We had a lot of issues with bluetooth interference (my smart watch lost connection to my phone all the time, and my wifes phone just disabled bluetooth over time). The Home Assistant app has been working flawlessly for the both of us so far! It connects directly to my own server, so no cloud integration needed.

Notifications

As added benefit of using the official Home Assistant app, I can easily push (actionable) notifications to our phones. Besides push notifications I also use TTS to our Google Home speakers for notifications.

My Lovelace setup

Mobile, or not?

We are using Home Assistant mostly from our phones, so in April 2020 I decided to redo my frontend to a mobile only view. This allows me to just focus on making this view look and work good. After all, when using a desktop I am mostly tweaking my setup anyway and thus mostly using the developer tools. My Lovelace setup is heavily inspired by jmart518: I got triggerd by this tweet of him.

Resources

I've extended the possibilities of the standard Lovelace interface through multiple plugins installed through HACS. In my configuration I am using the following plugins:

  • Lovelace Swipe Navigation which enables swiping through the different panes.
  • Card Mod is used to tweak the CSS styles of all cards I use. It also replaces functionality I used from the Custom Header plugin, as that has been deprecated. Check the themes folder to see what I used to mimick CH behaviour.
  • State Switch can be used to display different cards based on the state of an entity. I am using it to display custom greetings to myself and my wife.
  • Fold entity row is a really handy tool to have a fold out overview of entities. I am using it for my livingroom lights in the Home Screen, the gas prices in the Locations Pane and to fold the battery state overview (that uses the earlier mentioned Battery State Card) and the smart meter data in the status pane.
  • Simple Weather Card which beautifully displays the current weather for my location on the Home Screen.
  • Mini Media Player The most beautiful and compact media player I saw around there. These are being displayed only conditionally: when one of the media players is playing something this card will show on the Home Screen.
  • Simple Thermostat is used to display the thermostat controls for my Toon thermostat.
  • Battery State Card is used for, well, displaying the battery states :)
  • Button Card, used for the buttons in the settings pane.
  • Mini Graph Card to display temperature graphs in the temperature pane.
  • Auto Entities A legacy plugin that I've used in my previous setup, but it is still handy to use in some occasions.

The generic setup is done in ui-lovelace.yaml.

Ok, enough talking - show me your setup!

Ready, set..... go!

Swiping through the screens

Home Screen

Home Pane

The Home Screen (link to Lovelace config) contains some information that is always displayed, it also contains a lot of conditional cards. For instance, a reminder which trash should be put out will only be displayed on the day it will be collected. Media player controls will only appear when one of the media players is actually playing some media and remain hidden when in stand-by. Light controls for the lights part of the group "living room" are hidden with a "fold-entity-row" element. This greatly compacts the screen estate needed while still being able to toggle individual lights if we want to.

Temperature pane

In the temperature pane I have the controls for the thermostat and the different temperature graphs for the house. See the swiping image.

Location pane

Location pane

The location pane also uses a "fold-entity-row" element to display if we are at home and to display some diesel/gas prices around our area. It also displays the geocoded location of my phone - both as text and a map image - so my wife knows when to start cooking when I return home 😉. Oh, by the way: Fake GPS brought me to the stadium of the best soccer club in the Netherlands. Just so you know.

Settings pane

Settings pane

The settings pane contains 9 custom:button-cards to toggle some input-booleans that enable/disable certain functions in the house. Think of light automations based on movement and the ability of disabling the front door bell or the automations of the cover in the attic. All of them will ask for confirmation before actually toggling - to prevent unintended results.

Status pane

Status pane

The status pane is only displayed to me and shows some diagnostics of the system. It tells me the battery levels of the different wireless sensors in the house and if certain devices are still online. It will also list the current installed and latest available docker images and if HACS has any updates pending. It also shows the smartmeter power usage - using a state switch card it either displays the normal or low tariff sensor as header of the entity fold.

About

My Home Assistant configuration. More info at www.home-assistant.io or in the readme below.

Topics

Resources

Stars

Watchers

Forks