Commit

d1ddba1

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:…
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 press on one of the light switches toggles it, so I don't have to reach behind it. When a print finishes, an automation waits 30 minutes and cuts the power, but only if the printer is still in the finish state. If I started another print in the meantime, the state isn't finish anymore and nothing gets cut:
yaml
triggers:
  - trigger: device
    domain: bambu_lab
    device_id: <printer>
    type: event_print_finished
actions:
  - delay: { minutes: 30 }
  - if:
      - condition: state
        entity_id: sensor.printer_print_status
        state: finish
    then:
      - action: switch.turn_off
        target: { entity_id: switch.printer_plug }
mode: restart
Light. Opening the printer closet turns its chamber light on (if the printer is powered), closing it turns it off. Useful to check a print without opening the app. Now the fun one: knowing when a print ends, and whether it worked, without looking at my phone. Remember the snapshot from last commit? When I leave, the office state is saved with scene.create, and the "coming back" automation restores it. The printer reuses exactly that: 1. snapshot the office (same scene.create as when I leave) 2. turn the desk lamp green if the print succeeded, red if it failed 3. wait 10 seconds 4. trigger the "coming back" automation, skipping its conditions
yaml
  - action: light.turn_on
    target: { entity_id: light.desk_lamp }
    data:
      rgb_color: [0, 255, 0]
      brightness_pct: 100
  - delay: { seconds: 10 }
  - action: automation.trigger
    target: { entity_id: automation.office_coming_back }
    data:
      skip_condition: true
The lamp flashes for 10 seconds, then the room goes back to exactly what it was. Music, other lights, everything. skip_condition: true matters here. The "coming back" automation normally only runs if the house is in active mode and I'm home. Here I just want its actions, so I skip all that. The error version is the same automation with red, triggered by print_failed, print_error and printer_error events. mode: restart on both, so if two events come in quickly the last one wins. What I like is that I didn't write any "restore" logic for this. Snapshot, take over, restore was already there. Works for pretty much any notification I want to show with lights: doorbell, washing machine done, whatever. That's the payoff of small pieces that each do one thing well: the next feature is mostly plugging existing ones together.

commit d1ddba1

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…
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.
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…