I've been automating my home office with Home Assistant for a while now, and I'm going to share how it works in a short series of posts. From the very basic stuff to the part where an LLM runs parts of my house and I can talk with it from my phone.
Quick look at the setup first:…
Commit
9c47bd6
Starting with the boring but essential part: knowing if I'm actually in the room.
Everything else depends on it in my office: if presence is wrong, the lights go off while I'm sitting there, or the room stays lit for the cats 🐈.
The main sensor is an LD2410 mmWave radar wired…
Last commit was about presence detection, now the first thing it drives: the lights.
Two automations for that: presence goes on, lights on. Presence off for 5 seconds, lights off. Here's the "on" one, simplified:…
A short one this time: physical buttons for the music.
There's a smart speaker in my office. Reaching for the phone just to lower the volume gets is a no no, so I have cheap Zigbee devices on the desks: a small dimmer-style remote and a rotary knob. Both go through Zigbee2MQTT…
Sorry, this one took a bit longer than planned 😅 I mentioned house modes a couple of times already, so let's fix that debt. It's not really about the office, but almost every office automation depends on it.
I have one
input_select with four options: active, away, night,…This one is honestly the trick I like the mostt: when I walk out of my office, everything turns off. But when I walk back in I don't get some generic "office on" scene, I get exactly what I had when I left. Same light colors, same music, fan/heater at the same speed.
It all…
My 3D printer lives in the office, so of course it ended up wired into Home Assistant too. It's a Bambu Lab, the community integration exposes pretty much everything (state, progress, door, lights, events).
Small stuff first: power.
The printer is on a smart plug. A double…
The slightly over the top part of my office: the screens on my desk.
First an Awtrix, a small LED matrix clock running the open source Awtrix firmware. Out of the box it shows the time and its own sensors. I turned all of that off and push my own "apps" from Home Assistant instead. It cycles through:
- time and date
- office temperature and humidity
- outdoor weather with an icon
- 3D print progress, with a progress bar, only while a print is running
- number of devices in the house with a battery under 10%, blinking red, only when there's at least one
Each app is one action. Temperature, for example:
The low battery count is a template sensor that lists every battery-powered sensor I care about and counts the ones under 10%.
The second screen is a small display running Dashie (https://heydashie.com/), a kiosk app with its own HA integration. It's my control panel on the desk. The integration exposes the screen, brightness, auto brightness and screensaver as entities, so it follows the house mode like everything else:
-
yaml
- action: awtrix.awtrix_xxxxxx_push_app_data data: name: office_temp data: text: "{{ states('sensor.office_temperature') }}°C" icon: "{% set t = states('sensor.office_temperature') | float(20) %} {% if t < 15 %}19654{% elif t < 25 %}19655{% else %}19656{% endif %}" color: "{% from 'awtrix.jinja' import color_temp %} {{ color_temp(states('sensor.office_temperature') | float(20)) }}" duration: 7 lifetime: 600
color_temp is a small Jinja macro in custom_templates that turns a temperature into a color, blue when cold, red when hot. Shared between indoor and outdoor temperature so both use the same scale.
lifetime is the important part: if HA stops pushing updates, the app disappears after 10 minutes instead of showing a stale value forever.
To remove an app (print done, no more low batteries), publish an empty payload on its MQTT topic:
yaml
- action: mqtt.publish data: topic: "{{ states('sensor.awtrix_xxxxxx_device_topic') }}/custom/print_progress" payload: ""
active: screen on, auto brightness
- away / night: dimmed screensaver, brightness at 5
- vacation: screen off
One automation, three branches with a choose on trigger ids, same pattern as my music remotes.
None of this is necessary. But a quick look at the desk tells me the temperature, if a print is done and if something needs a battery, and I like that.
What I learned building it: good information shows up without interrupting me, and disappears as soon as it's not true anymore. A stale value on a screen is worse than no value at all.
Dashie for Home AssistantDashie for Home Assistant - Free Android Tablet Kiosk with VoiceA free alternative to Fully Kiosk for hosting Home Assistant dashboards on Android tablets — screensaver, motion wake, "Hey Dashie" voice, cameras, and Music Assistant. No account, no subscription.
commit 9c47bd6
Time to leave the office for a bit. The AC and the shutters cover the whole house, and I handed both over to an LLM.
Why not plain automations? Because AC rules get messy fast: season, time of day, indoor vs outdoor temperature, humidity, open windows, people sleeping... As…