My Home Assistant Floorplan

2 minute read

During the past 6 months I’ve really gained an interest in home automation. I discovered home assistant and have a nearly endless list of projects to work on. While browsing the /r/homeassistant subreddit I discovered the ability to utilize the new lovelace UI to create an interactive 2D floorplan. You can view a basic example in the excellent lovelace documentation.

My 2D Floorplan

The 2D floorplan worked great. I could have a room lighten up when the lights were on, as well as toggling them on and off. I was also able to see sensors values like temperature and motion sensor events. The floorplan works well for giving you a quick overview of the lights/sensors in your house.

I was pleased with what I had created, but then I saw a few posts on reddit where users had created a 3D floorplan with rendered images that also included realistic lighting.
This post and this one, in particular, inspired me to create my own 3D floorplan.

After several weeks of experimenting with SweetHome3D to create the 3D model, I ended up with a pretty accurate representation of my house. I then added the floorplan as a picture-elements card and added all of my entities to it. You can see it in action below.

Some features shown in the video:

  • Back door opens in the floorplan when the back door contact sensor reports that it is open and closes when the sensor reports closed.
  • Ability to toggle lights and view which lights are on with accurate light rendering.
  • Ability to view status of cameras and arm/disarm them.
  • Ability to turn the TV(s) on or off as well as showing a glow when they are on.
  • Button that toggles between the 2 floors of the house.
  • Displays sensor values for temperature and motion sensor events.

Because of the angle I used to display my floorplan I was not able to add a button on the floorplan itself to toggle the kitchen counter lights. To get around this, I created several separate renders of the kitchen counter and made that into an element in the picture-elements card. The image accurately updates based on the state of the kitchen and counter lights.

I plan on writing two future posts that will cover how you can create your own 3D floorplan for use in home assistant. The first post will cover some tips and tricks for using SweetHome3D to create your house and render the images needed. In the second post I will share my lovelace configuration and explain how I implemented the various features in my floorplan.