[ Home Automation ]
[ Foundations |
Hardware & Setup |
Alarm & Security |
Devices & Appliances |
Integrations |
Blueprints → |
Snippets → |
Links & Resources → ]
Home Assistant configs, automations, and supporting scripts from the home lab. Snippets get pulled out, scrubbed of secrets, and published here as they become generally useful. Most examples assume a Home Assistant install with the standard integrations enabled (companion app, ONVIF, a TTS engine like Piper) but each guide calls out its specific dependencies up front. Targeting a different sensor brand, speaker, or camera vendor? Most automations are retargetable by swapping entity_ids — the underlying state-machine patterns hold regardless of the hardware.
[ Foundations ]
Start-here guide for the action-sequence language Home Assistant uses for scripts AND automations. Covers the conceptual difference between scripts / automations / scenes / blueprints, where scripts live in the config tree, full script anatomy (alias / mode / fields / variables / sequence), the four execution modes (single / restart / queued / parallel) and when to use each, the five ways to call a script, three places to introduce values (fields / variables / inline Jinja), the five most-common action-flow patterns (chained scripts, choose, repeat, parallel, continue_on_error), and how to debug via traces + Developer Tools + Template editor. Seven common gotchas at the bottom covering the kinds of bugs that silently waste an evening (wrong mode dropping calls, templates against None attributes, delay: blocking mode tracking, reloading the wrong config block, etc.). Read this before the longer guides below if you're new to HA YAML. Read the quick-start →
[ Hardware & Setup ]
Short guide for flashing an ESP32 as a Bluetooth proxy — extends HA's BLE range across the house without any coding. Web-flash from Chrome via web.esphome.io, auto-adopt into HA, plug in near the room you want to cover. About 10 minutes per proxy. Covers placement tips, board recommendations (ESP32-C3 Mini, ESP32-S3, M5Stack Atom Lite), and the usual troubleshooting (missing serial port, mDNS across VLANs, slow-advertising BLE sensors). Read the guide → · Raw markdown
Drop-in ESPHome config for the Athom Smart Plug V3 that layers dentra/esphome-components on top of the official Athom base package to add Today / Yesterday / Week / Month / Year energy sensors alongside the stock cumulativetotal_energy_sensor. About 40 lines of YAML per plug. Walks through the four blocks that matter — substitutions (name, friendly name, current limit, timezone), the Athom base package include, the dentraexternal_componentshook, and theenergy_statisticssensor declaration. Includes the full known-working config up front, then explains why each block is the way it is. Closes with a troubleshooting table (component-not-found compile errors, sensors stuck at 0, wrong-timezone rollovers, NVRAM persistence) and a multi-plug fleet section: MAC-suffix hostname convention, ESPHome packages refresh strategy, sed-across- all-plug-files pattern when you want to bump a pinned ref. Read the guide →
[ Alarm & Security ]
Seven-step walkthrough for building a self-hosted alarm on top of Home
Assistant's manual alarm_control_panel. Highlight-syntax YAML through-
out, retargetable to any sensor / speaker / light setup by swapping
entity_ids.
1. Panel — arm/disarm with code, three armed
modes (home / night / away), grace + entry
delays
2. Detection — perimeter (any armed mode), interior
(away only), separate bedroom rule so the
2am bathroom trip doesn't trip the siren
3. Response — entry-warning TTS, full alarm push,
loud local-Piper TTS, YouTube cast to a Nest
display, 30-cycle red-strobe lights
4. RGB feedback — bulbs flash blue/green/amber for
armed/disarmed/pending states using the
canonical scene-snapshot → flash →
restore pattern
5. PTZ tracking — mmWave or PIR sensor trips a zone
→ ONVIF preset move → settle →
snapshot → push notification with the
image attached. DRY lookup-table pattern so
new zones are a two-line edit
6. Privacy mode — five-layer stack engaged when phone
trackers or indoor sensors detect anyone home:
wall preset, hardware shutter, recording
switches off, RTSP stream stopped, tracking
automation disabled. Reverses on house empty
7. Door locks — Z-Wave / Zigbee / Matter smart locks
wired both directions: auto-lock on arm with
jammed-deadbolt verification, disarm-via-PIN
with per-slot user names, forced-entry
detection (contact open + lock still locked),
wrong-PIN lockout that triggers the alarm
Plus auto-arm-at-midnight as a bonus, and a caveats block up front:
not a monitored alarm, depends on the network, only as loud as your
speakers, only as bright as your bulbs — with notes on when to
layer in a real Zigbee siren or a monitored service.
[ Devices & Appliances ]
Five YAML files for driving a Storz & Bickel Volcano Hybrid from Home Assistant: an auto-progress temperature automation (Vapesuvius ladder), a manual ±step action set for dimmer remotes, a fill-a-bag script, six voice commands wired through HA Assist, and a single-paste Lovelace dashboard card. Each file is independent — drop in whichever ones you want, or use all five together. Requires the SavageNL/home-assistant-volcano-hybrid HACS integration; retargetable to other vaporizers / heated-element devices by swapping the climate entity. Read the build →
Voice-Activated Dog TV in Home Assistant — 05.2026
Voice command that turns on a TV and plays a random YouTube Dog TV video automatically. Say "dog tv bedroom" → TV powers on → deep-link fires into the YouTube app on the TV → one of a curated list of long-form ambient videos starts playing. Different video each call. Stack: Android Debug Bridge integration for deep-link firing, Android TV Remote integration for reliable power-on, a custom sentence incustom_sentences/en/for the trigger phrase, anintent_scriptentry to route the intent into the script, and the script itself inscripts.yamlwith the random-URL Jinja template. Documents the three load-bearing details that silently break this kind of setup: avoid trigger phrases starting with "play" (built-inHassMediaSearchAndPlayintercepts), usescript.turn_onwith a target for async dispatch so the Voice satellite doesn't time out on the 15-second TV boot delay, and useservice:(notaction:) insideintent_scriptbecause that block predates the newer syntax alias. Includes troubleshooting table and notes on retargeting to webOS / Tizen / Roku TVs viamedia_player.select_source. Read the guide →
Home Assistant guide for outdoor lights that come on automatically at sunset, ramp up gradually as it gets darker, and fade back out before the overnight off-time. Two flavours covered — a single 30-minute fade from ~0% to 100%, or a three-stage step fade (20% → 60% → 100% across the first hour past sunset). Both share the same fade-out + midnight-off tail. Includes the two-step turn-on trick that works around HA's "transitions don't apply when the light starts from off" quirk, a warm-amber default plus four other color presets, and a troubleshooting table for the usual snags (location not set, transition not honoured, bulb floor > 0). Pair with the outdoor-lights snippet on the snippets page if you just want the short-form copy-paste version of the simple-fade variant. Read the guide →
[ Integrations ]
Medication Reminder & Medication Reminder (HACS) — dose tracking two ways — 06.2026
Multi-dose medication reminders for Home Assistant — for pets or people — with actionable nag notifications, missed-dose escalation, and given / not-given state synced across every household Companion app. Two implementations of the same idea; pick the one that matches how you like to manage HA. Path 1 — ha-medication-reminder — YAML package (stable) A single package file dropped intopackages/, with no external dependencies and no custom code. A data-drivendoses:list defines every reminder; the package generates oneinput_boolean.med_<id>per dose, the caretaker notification automations, and TTS-ready escalation entities. Actionable push with a "Mark given" button, 15-minute nags until acknowledged, household-synced state with logbook accountability, and a zero-maintenance auto-entities dashboard. Timer-based, so it survives restarts. Production-ready, no upgrade churn. Path 2 — ha-medication-reminder-hacs — HACS custom integration (alpha) Same goal, managed entirely through the Settings UI instead of YAML — and now with a meaningfully richer feature set than the YAML version: — Flexible scheduling per dose — daily, specific weekdays, or every N days from a start date — Supply & refill tracking — optionalnumber.<patient>_<med>_supplycounter that decrements on each dose, plusbinary_sensor.<patient>_supplies_lowfor threshold alerts — Early-dose warning with an undo button if you mis-mark a dose given — Auto-discovering dashboard card — red/green status panel + schedule overview, no manual entity enumeration as you add patients — Event publishing (medication_reminder_dose_given/_dose_undone) for wiring into other automations — Blueprint-based automation imports — reminder automations come in as HA blueprints rather than a static companion YAML, so updates propagate cleanly — 12h / 24h time format, configurable nag windows, configurable daily reset time Plus the original feature set: per-patient notification routing,switchentity per dose,binary_sensors for all-doses-given and needs-attention. Install via HACS as a custom repository. Optional companion cards (auto-entities, card-mod) for the prettier dashboard. Still alpha — not widely tested, breaking changes possible between releases. When to use which — YAML package if you keep your config in version control, want zero dependencies, are happy editing adoses:list, and want something you can leave alone for months. It's the stable, production-ready path. — HACS integration if you want every-N-days scheduling, supply tracking, the auto-discovering dashboard, or event hooks into other automations — and you're comfortable running alpha software that may break between updates. Both are MIT licensed. Either way: it tracks medication, so treat it as a convenience layer, not a medical device — validate against your own setup and keep a backup reminder method before relying on it.
[ Blueprints → ]
Reusable Home Assistant blueprints — templates with named inputs
that you instantiate per device or per scenario instead of hand-rolling
a new automation each time. Import once via Settings →
Automations & Scenes → Blueprints, then create as many
automations from each as you need.
Current catalog:
Contact Sensor — Issue State Notification (Advanced)
— contactSensorIssueState.yaml
binary-sensor "left in issue state" alerts with debounce,
auto-clear, repeat reminders, N-target notify, and custom
enter/leave actions. One blueprint per door, window, or
motion sensor — instantiate as many automations as
you have entities
Outdoor Lights — Sunset Fade-in / Overnight Fade-out
— outdoorLightsSunsetFade.yaml
single-automation wrapper for the full sunset-to-midnight
cycle: fade in at sunset, fade out at a configurable late-
evening time, hard-off after. Configurable color, brightness,
durations, sunset offset, and an optional sun-elevation gate
so high-summer evenings don't kick the lights on while it's
still bright outside
For the full per-blueprint write-up plus the install recipe (both
HA UI and file-drop methods), visit
blueprints/.
[ Snippets → ]
Smaller standalone automations and templates — one-liners,
helper sensors, and YAML patterns extracted from larger setups:
— Low-battery aggregator (any device under N%)
template binary_sensor that fires when any battery-class sensor
drops below threshold, no per-device enumeration
— Smart-charging cutoff (stop at 80%)
cut a smart plug when phone hits 80% to preserve lithium cell life;
state-condition prevents the trigger from firing during discharge
— Door auto-lock with open-door safety
re-lock front door after 5 min unlocked, contact-sensor interlock
prevents bolt-vs-strike-plate grinding
— Outdoor lights — sunset fade-in / overnight fade-out
sunset → 30-min fade in to warm amber, 23:30 → 30-min fade
out, midnight off; demonstrates the two-step fade-on trick that
works around HA's no-transition-from-off limitation
Each snippet on the dedicated page is shown inline with its YAML; copy
what you need into your own configs. New snippets get added directly
to snippets.html as they're written up.
[ Links & Resources → ]
Curated outbound links across the home-automation stack: platform core, protocols, voice, cameras, hardware vendors, and the community docs worth bookmarking. All on their own page now — same structure as pubCarHacking/links.html. Platform & tooling — Home Assistant The dashboard / automation engine the whole stack rides on — ESPHome YAML-configured firmware compiler for ESP32 / ESP8266 Protocols — Zigbee2MQTT Coordinator-stick bridge to MQTT, vendor-neutral — Z-Wave JS UI Z-Wave dashboard + driver, runs as an HA add-on — Matter / Thread The cross-vendor standard that's finally landing Voice / TTS / STT — Piper TTS Local text-to-speech, Wyoming-protocol native — faster-whisper Local speech-to-text on Whisper + CTranslate2 — openWakeWord Always-on wake-word detection Cameras & NVR — Frigate NVR Real-time AI object detection, HA-native — go2rtc Universal RTSP / WebRTC streamer — ONVIF Open camera control protocol Hardware — Espressif ESP32 / ESP8266 The default microcontroller for HA-friendly DIY work — Sonoff (ITEAD) Cheap WiFi / Zigbee switches, relays, sensors — Aqara Polished Zigbee sensors + cameras at consumer prices Community & docs — Home Assistant Documentation Official docs — automations, scripts, blueprints, templates For the full landing page with descriptions and per-entry cross-links, visit links.html.
