What is Pyscript?
masterPyscript is a Home Assistant custom integration that allows you to write Python functions and scripts to implement automation, logic, and triggers. It provides a seamless, Pythonic way to interact with Home Assistant by binding state variables to Python variables and making Home Assistant services callable as standard Python functions.
Key features include:
- Parallel Execution: Functions run as small, independent programs that can run in parallel for extended periods.
- Non-blocking Operations: Functions can
sleeporwaitfor state changes or events without affecting other operations. - Triggering Mechanisms: Use Python decorators to trigger functions based on state changes, time (including cron syntax), or events.
- Jupyter Integration: Includes a kernel that allows interactive development and testing via Jupyter notebooks, Lab, or VS Code.