Pyscript 2.0.0 release
The 2.0.0 release supports HASS 2026.5+, and is backward compatible with earlier versions.
This release has a major refactoring of the decorator subsystem, plus compatibility updates and bug fixes.
Thanks to @dmamelin for the significant contributions and improvements in this release!
The major change is a new decorator manager that replaces the monolithic decorator implementation with a modular architecture organized by decorator type (state, event, timing, service, mqtt, webhook, task). The new implementation is the default; if you encounter a regression you can temporarily set legacy_decorators: true in your pyscript configuration to revert to the prior behavior while filing a bug report. The legacy code will be removed in a future version.
There are no intentional breaking changes.
Summary of changes:
- Refactored decorator subsystem into a modular decorator manager (PR #818 from @dmamelin); also see #795
- Added
legacy_decoratorsconfig option to revert to the prior decorator implementation if issues are discovered (PR #818 from @dmamelin) - Significantly improved internal error handling for more accurate error messages and tracebacks (PR #813 from @dmamelin)
- Fixed regression in legacy trigger expressions (PR #823 from @dmamelin)
- Fixed AST slice handling (PR #816 from @dmamelin)
- Fixed
EvalFuncVarbinding via descriptor (PR #790 from @dmamelin) - Fixed module context starting before Home Assistant is ready (PR #785 from @dmamelin)
- Migrated linting from black/isort/flake8/bandit to ruff (PR #805 from @dmamelin)
- Documented reload limitation when using
legacy_decorators(PR #822 from @dmamelin) - Added HA 2026.5 compatibility for
StateValhelpers, with backward compatibility for older HA versions, and support for Python 3.14 (PR #828 from @dmamelin) - Added
webhook_triggerIDE stub (PR #825 from @nolsto) - Added support for
Noneashold_offintime_activeandwatchinstate_trigger(PR #822 from @dmamelin) - Documentation updates
The release includes contributions from @dmamelin, @nolsto, and @mefranklin6. Thanks to everyone who contributed PRs and reported issues.
Enjoy!