Commit

7477cab

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 and both control the speaker: - knob: turn right/left for volume, single press for play/pause, double press for next track, pretty standard - remote: brightness up/down buttons for volume, toggle for play/pause It very easy to "hack" any device with buttons to control your smart speakers. All in one automation, with trigger ids so each gesture maps to an intent:
yaml
triggers:
  - trigger: device
    domain: mqtt
    device_id: <knob>
    type: action
    subtype: rotate_right
    id: up
  - trigger: device
    domain: mqtt
    device_id: <remote>
    type: action
    subtype: brightness_step_up
    id: up
  # same for rotate_left / brightness_step_down -> down,
  # single / toggle -> playpause, double -> next
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: up
        sequence:
          - action: media_player.volume_up
            target:
              area_id: office
      - conditions:
          - condition: trigger
            id: down
        sequence:
          - action: media_player.volume_down
            target:
              area_id: office
      # playpause -> media_player.media_play_pause
      # next -> media_player.media_next_track
Two things I like about this. Trigger ids. Two different devices, two different gestures, same id up. The actions don't care where the input came from. Adding a third remote later is just a few more triggers, nothing to touch in the actions. Heads up: since 2026.10 the UI handles this a bit differently, with a "Triggered by" condition where you tick the triggers instead of typing IDs. The YAML above still works as is. And the target is area_id: office, not the speaker entity. The automation doesn't know which speaker is in the room and doesn't need to. If I replace it tomorrow, or add a second one, I assign it to the office area and the remotes just work with it. Same for pretty much any "control the stuff in this room" automation, targeting the area ages a lot better than hardcoding entities. Nothing fancy, but remember that any device HA can see can act as a cheap remote for your speakers. And it goes further than buttons: cheap devices can make dumb stuff smart. At some point I'll tell you how my dryer got smart with nothing more than a cheap smart plug.

commit 7477cab

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