Home Assistant is our self-hosted smart home platform. It controls lights, switches, sensors, and automations across the house, running locally with no cloud dependency.
Overview
Home Assistant1 is an open-source home automation platform. In our setup it runs as a dedicated instance on the local network, managing everything from IKEA lighting to presence detection. The agent interacts with it via the REST API through the homeassistant skill.
Key Concepts
Entities
Everything in Home Assistant is an entity — a light, a sensor, a switch, a person. Each has a unique ID like light.bedroom or binary_sensor.bathroom_door and exposes state plus attributes.
Integrations
Integrations connect HA to devices and services. Our setup uses:
- Matter — for IKEA smart home devices (lights, plugs)
- Zigbee (via ZHA or Zigbee2MQTT) — for remotes and some sensors
- Mobile App — Companion App on Pixel 8 Pro for presence and sensor data
- CalDAV — planned integration with Baïkal for calendar-aware automations
Automations & Scripts
- Automations fire on triggers (sensor changes, time, events) and run actions
- Scripts are reusable sequences of actions, callable from automations or the API
Our Setup
Lighting
The upstairs lighting group (light.upstairs_2) includes:
| Entity | Name | Color Modes |
|---|---|---|
light.bedroom | Bed Lamp | color_temp, xy |
light.upstairs_floor_lamp | Upstairs Floor Lamp | color_temp, xy |
light.upstairs | Upstairs Den Lamp | color_temp, xy |
light.red_lamp | Red Lamp | color_temp, hs, xy |
light.upstairs_lamp | Upstairs Lamp | color_temp, xy |
light.stairwell | Stairwell | on/off |
All upstairs lights are IKEA devices connected via Matter, supporting color temperature control (warm white to cool white) and XY color on most fixtures.
Remotes & Controls
A Zigbee remote in the bedroom controls the upstairs lights with on/off, dim up/down, and an “everything off” function. It runs on battery (typically 100%) and communicates directly with HA — no cloud round-trip.
Sensors
| Sensor | Type | Status |
|---|---|---|
binary_sensor.bathroom_door | Contact | ✅ Working |
binary_sensor.upstairs_motion | Motion | ✅ Working |
binary_sensor.downstairs_motion | Motion | ✅ Working |
binary_sensor.kitchen_motion | Motion | ✅ Working |
binary_sensor.bathroom_motion | Motion | ❌ Dead battery |
Presence
person.brad_wenner— tracks home/away via Companion Appinput_boolean.floor_occupancy— tracks upstairs vs. downstairs
Morning Routine
The morning routine is designed as a multi-stage wake-up system that adapts to the type of day (workday, weekday, weekend).
Architecture
graph TD A["🔔 Alarm Sensor / Next Alarm"] -->|10 min before alarm| B["Morning Routine Start"] B -->|"Check: person home?"| C{"Home?"} C -->|No| Z["Skip"] C -->|Yes| D["Determine day type<br/>(work cal + day of week)"] D --> E["morning_routine_active = ON"] E --> F["Light Ramp Script<br/>10-min gradual brightness<br/>2200K → 3500K"] F --> G{"Remote OFF / Snooze?"} G -->|"Yes + NOT workday"| H["Snooze: lights off → 5 min wait<br/>→ accelerated 5-min ramp"] G -->|"Yes + workday"| I["Ignore<br/>(no snooze on work days)"] G -->|No interruption| J{"Awake trigger?<br/>bathroom door / stairs / downstairs"} H --> J J --> K["morning_routine_active = OFF"] K --> L{"Day type?"} L -->|Workday| M["🏢 Workday actions"] L -->|Weekday| N["📋 Weekday actions"] L -->|Weekend| O["☕ Weekend actions"]
Day Type Logic
The system checks the Work calendar (via CalDAV) for CONFIRMED events. Only confirmed shoots trigger the workday path — HOLD events are treated as unconfirmed.
IF calendar.work has CONFIRMED event today → "workday"
ELSE IF Monday–Friday → "weekday"
ELSE → "weekend"
Prerequisites
The full routine requires:
- CalDAV integration added to HA (Baïkal server)
- Next Alarm sensor enabled in Companion App
- Sleep as Android HACS integration reconnected (for alarm events)
Helpers
input_boolean.morning_routine_active— is the routine running?input_boolean.morning_routine_snoozed— snooze stateinput_select.morning_day_type— weekday / workday / weekendinput_datetime.morning_alarm_time— alarm time storagetimer.morning_snooze— snooze countdown
Agent Integration
The agent controls Home Assistant via the homeassistant skill, which wraps the HA REST API. Common operations:
- Toggle lights and switches
- Query entity states and attributes
- Fire scripts and automations
- Create/update helper entities
Credentials are stored in Vaultwarden under the “Home Assistant” item.
See Also
- Agent Skills — full reference of agent capabilities including the HA skill
- Static Site Hosting — another piece of self-hosted infrastructure
- Credential Management — how API tokens are managed
Footnotes
Footnotes
-
Home Assistant official documentation: https://www.home-assistant.io/ (verified accessible 2026-02-26) ↩