🧭 HASSL Changelog
[v0.3.0] — 2025-10-20
🚀 Highlights
- Modular packages & imports — new
package
/import
system for multi-file HASSL projects. - Private visibility — mark aliases, schedules, and syncs as
private
to keep them scoped to one package. - Schedule sensors — schedules now compile into restart-safe
binary_sensor.hassl_schedule_<pkg>_<name>_active
template sensors. - Cross-package imports — rules can
schedule use
a schedule defined in another package. - Emacs major mode — added
hassl-mode.el
with highlighting, indentation, and smart semicolon handling. - Safer semicolon rules — semicolons are only required inside
then
action lists andschedule
clause lists.
🧱 Language & Grammar
- Added new grammar productions:
package_decl
andimport_decl
private
modifier for aliases and schedules- relaxed semicolon placement rules
- Updated transformer/analyzer to:
- Resolve cross-package imports via
GLOBAL_EXPORTS
- Populate
IRProgram.schedules
for codegen - Support alias resolution in expressions and actions
- Resolve cross-package imports via
⚙️ Codegen & Tooling
package.py
- Emits template binary_sensors for schedules.
- Added
ScheduleRegistry
to ensure one helper per (package, schedule). - Fixed clock/sun expression output to use pure Jinja (
now().strftime
andstate_attr('sun.sun', ...)
).
rules_min.py
- Full alias resolution (local + imported).
- Inline schedules compile to
condition:
blocks, no helpers. - Validation for missing schedules.
hassl-mode.el
- Syntax highlighting for
package
,import
,private
, etc. - Context-aware electric semicolon.
- Simple indentation for
rule
andschedule
blocks.
- Syntax highlighting for
📚 Documentation
- README.md updated:
- Added imports example (
import std.shared.*
) - New features section for v0.3.0.
- Added imports example (
- Quickstart.md rewritten for packages/imports and schedule sensors.
- Language Specification bumped to v1.4 (2025):
- Added package/import grammar.
- Clarified semicolon rules.
- Expanded schedule sensor semantics.
🧪 Tests & Stability
- Added tests for:
- Cross-package imports.
- Schedule sensor generation and alias resolution.
- Fixed analyzer fallback when schedules are dict-shaped in IR.
- Verified against HA template engine for valid Jinja expressions.
❤️ Contributors
- @adanowitz — core DSL design, compiler, and docs.
- ChatGPT (GPT-5) — co-authoring, refactoring, and language spec updates.
[v0.2.1] — 2025-09-??
🧩 Maintenance
- Packaging fixes for PyPI release.
- Added
setup.cfg
metadata and MANIFEST cleanup.
[v0.2.0] — 2025-08-??
✨ Initial public release
- Base compiler and YAML generator.
- Rules, syncs, waits, and schedules (single-file).