This is an automated archive made by the Lemmit Bot.
The original was posted on /r/homeassistant by /u/adanowit on 2025-10-20 21:41:02+00:00.
🎉 HASSL v0.3.0 — Modular Automations, Packages & Schedule Sensors
Hey folks 👋
I’m excited to share HASSL v0.3.0, the newest release of the Home Assistant Simple Scripting Language — a human-friendly DSL that compiles into loop-safe, deterministic, and composable automations for Home Assistant.
If you haven’t seen it before, HASSL lets you replace long YAML automations with something that looks more like plain English:
alias motion = binary\_sensor.landing\_motion
alias lux = sensor.landing\_lux
alias light = light.landing\_main
schedule wake\_hours:
enable from 08:00 until 19:00;
rule motion\_light:
schedule use wake\_hours;
if (motion && lux < 50)
then light = on;
wait (!motion for 10m) light = off
That compiles into a full Home Assistant package with helpers, scripts, context tracking, and restart-safe schedules — no YAML editing needed.
🆕 What’s new in v0.3.0
🧩 Modular packages & imports
- You can now organize automations across multiple files:
hassl package std.shared alias light = light.kitchen schedule wake_hours: enable from 07:00 until 22:00;
package home.living
import std.shared.\*
rule motion\_light:
schedule use wake\_hours;
if (motion && lux < 50)
then light = on
→ The compiler wires it all up automatically across packages.
🔒 Private visibility
- Use
private aliasorprivate scheduleto keep symbols scoped to one package.
🕒 Schedule sensors
- Schedules now emit template binary_sensors like
binary_sensor.hassl_schedule_std_shared_wake_hours_active
that auto-update on startup and across sunrise/sunset.
⚙️ Smart semicolons
- Semicolons are now required only inside
thenblocks and schedule clause lists — not everywhere.
🧠 Cleaner HA templates
- Schedule sensors now output pure Jinja expressions (no
{% %}inside{{ }}).
💻 Emacs major mode!
- Syntax highlighting, indentation, and context-aware semicolons for HASSL files (
hassl-mode.el).
📦 Output snapshot
HASSL compiles each .hassl file into a self-contained HA package:
| File | Purpose |
|---|---|
helpers_<pkg>.yaml |
Defines all input_boolean, input_text, input_number helpers |
scripts_<pkg>.yaml |
Context-stamped writer scripts |
rules_bundled_<pkg>.yaml |
All rules, waits, and gates |
schedules_<pkg>.yaml |
Template schedule sensors (new in v0.3.0) |
Everything drops directly into /config/packages/.
🔧 Install or upgrade
bash pip install -U hassl
Or install from source:
bash git clone https://github.com/adanowitz/hassl.git cd hassl pip install -e .
❤️ Why it matters
HASSL isn’t just another templating layer — it’s a small compiler that turns structured, readable logic into loop-safe YAML. It stamps context IDs, reuses schedules, and stays compatible with every HA version that supports template sensors.
You can think of it as “TypeScript for Home Assistant YAML.”
🔗 Links
- 🧠 GitHub: github.com/adanowitz/hassl
- 🐍 PyPI: pypi.org/project/hassl
- 💬 Discussion: r/homeassistant
Happy automating, and huge thanks to everyone testing and contributing!
Questions, bugs, or feature ideas? Drop them here or open an issue on GitHub.


