---
title: A floor plan that knows which lights are on
date: "2026-11-09"
description: "Bringing the house project and Home Assistant together, with Blender renders, explicit room mappings, and a surprisingly useful separation of concerns."
draft: false
---

The house project and the home lab meet in my Home Assistant floor plan. Blender provides the visual model. Home Assistant provides the state. A custom Lovelace card brings the two together.

The browser does not render a live 3D house. It combines pre-rendered images. That distinction keeps the visual experiment small enough to understand and gives each part of the system a clear job.

## A rendering is a view, not the source of truth

[![Blender exports base images and light overlays to a Lovelace card. Home Assistant sends entity states to the card, and the card sends service calls back to Home Assistant.](/images/floor-plan-flow.svg)](/images/floor-plan-flow.svg)

[Open the diagram at full size](/images/floor-plan-flow.svg).

Blender exports day and night base images plus overlays for room lighting. The card reads Home Assistant entity states and chooses which overlays to draw. When someone interacts with a mapped room, it sends a normal Home Assistant service call.

The visual assets and the automation state can therefore change independently. A lamp replacement should normally mean an entity-mapping change, rather than rebuilding the model of the house.

## Map the room deliberately

This is the shape of a room override for my custom card. The room and entity names below are invented; they do not describe the actual household layout.

```yaml
# rooms.yaml — for custom:kroit-floorplan-card
EG/Studio:
  name: Studio
  lights:
    - light.studio_ceiling
    - light.studio_desk
  temperature: sensor.studio_temperature
  presence: binary_sensor.studio_presence
```

The key has to match the room identifier in the render assets. Explicit mappings also make a useful boundary: a switch should not become a room light merely because it appears in the same area. Some devices expose configuration or screen controls as switches.

This YAML is specific to my custom card, not a built-in Home Assistant feature.

## The hidden floor still needs a test

The selected floor and the state of its lights are separate concerns. A room can change state while its floor is hidden, and an update should not make that hidden floor visible.

That turned into a concrete regression case in the project. It is a good reminder that a convincing rendering is only part of the interface. The state transitions need to make sense too.

The fuller engineering write-up covers the additive light composition, alpha masking, explicit mappings, and the regression test. I keep that reusable technical material on [Cloudsium: a Home Assistant floor plan rendered in Blender](https://www.cloudsium.de/blog/home-assistant-blender-floor-plan/).

Here, I want to keep the wider thread: using software to make the house easier to understand, while keeping the visual layer free to evolve.
