Commit

ce63c51

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 relies on scene.create, which I ignored for way too long. You give it a list of entities, it saves their current state into a scene on the fly. Turn that scene on later and you're back. The "leaving" automation (presence off) now snapshots before shutting down:
yaml
- action: scene.create
  data:
    scene_id: office_last_state
    snapshot_entities:
      - light.desk_strip_left
      - light.desk_strip_right
      - light.desk_lamp
      - media_player.office_speaker
      - light.diffuser
      - select.diffuser_mode
- action: scene.create
  data:
    scene_id: office_last_climate
    snapshot_entities: >
      {{ ['fan.office_fan', 'switch.office_fan_oscillation']
         + (['climate.office_heater']
            if states('climate.office_heater')
               not in ['off','unavailable','unknown'] else []) }}
Two scenes on purpose: the heater is only saved if it was running, so restoring never turns it on by mistake. And if the lights were already off, there's nothing to save. Coming back:
yaml
- if: "{{ (state_attr('scene.office_last_state','entity_id') | default([]) | length) > 0 }}"
  then:
    - action: scene.turn_on
      target: { entity_id: scene.office_last_state }
      continue_on_error: true
    - action: scene.delete
      target: { entity_id: scene.office_last_state }
Restore, then delete right away. One snapshot, one restore. Same thing for the climate scene. If there's nothing to restore, I fall back to the basic behavior: default set of lights on, plus the Adaptive Lighting off/on toggle so the color temp is right immediately. Last bit: when the house goes from night or vacation back to active (remember the house modes from last commit), both scenes get wiped. After a night's sleep I don't want last evening's lighting back, I want a clean start. Few things I learned along the way: - scenes from scene.create only live in memory, a restart wipes them. Fine for this use case - put continue_on_error: true on the restore, one unavailable device shouldn't break everything - delete the scene once used or I end up restoring stuff from hours ago The snapshot also turned out to be useful for something else, but that's another story.

commit ce63c51

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