[ 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, and 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, which 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 →
An ESP32 running ESPHome as a capture-and-replay bridge for the two dialects most household remotes speak: infrared (TV, AC, media) and 433 MHz (cheap RF outlets, doorbells, blinds). Uses remote_receiver to dump the codes and remote_transmitter to play them back: point a remote at the receiver, copy what the dumper prints into a template button, and Home Assistant discovers it automatically over the API. YAML only, no firmware coding. Covers the IR / 433 wiring, the receiver and transmitter config, reading the decoded / raw dump output, and a full single-board example config. Includes the rolling-code caveat: garage doors and car fobs rotate their code every press, so replay can't (and shouldn't) touch them. 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 ]
A single-paste Lovelace dashboard for the Creality K2 Plus, built on the ha_creality_ws integration: live camera, print status with ETA, nozzle / bed / chamber temperature gauges, print controls, dual CFS filament tables, external filament, and a 2-hour temperature graph. Stock Lovelace cards only: paste it, swap in your printer's entity prefix, done. Read the build →
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, so 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 →
The same Volcano Hybrid, driven straight from your browser over Web Bluetooth. No Home Assistant, no app, no backend; nothing leaves your machine. Temperature, heat, fan, bag fill, editable presets, the Vapesuvius ladder (optionally filling a bag at each rung), scripted heat / fan / wait workflows, a terminal console, and the device settings. Installable PWA, works offline; Chromium desktop / Android Chrome only. On its own subdomain, open source at magikh0e/volcano-hybrid-control, built by reverse-engineering the S&B BLE protocol (the how-to guide). Open the controller →
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 — multi-dose tracking for Home Assistant 06.2026
A Home Assistant custom integration for multi-dose medication reminders, for pets and people, managed in the Settings UI and installable from the default HACS store. Actionable "Mark given" push notifications that nag until acknowledged, missed-dose escalation, supply / refill / cost and as-needed (PRN) tracking, per-patient sensors and a calendar, and split caregiver and admin dashboards — with given / not-given state synced across every Companion app. Read the guide → GitHub →
[ 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, so 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 for automations, scripts, blueprints, templates For the full landing page with descriptions and per-entry cross-links, visit links.html.
