hacs-pyscript
stable
  • Overview
  • Installation
  • Configuration
  • Tutorial
  • Reference
  • Contributing
  • New Features
  • Useful Links
hacs-pyscript
  • Docs »
  • Pyscript: Python Scripting for Home Assistant
  • Edit on GitHub

Pyscript: Python Scripting for Home Assistant¶

GitHub Release License hacs Project Maintenance

This HACS custom integration for Home Assistant allows you to write Python functions and scripts that can implement a wide range of automation, logic and triggers. State variables are bound to Python variables and services are callable as Python functions, so it’s easy and concise to implement logic.

Contents¶

  • Overview
  • Installation
    • Option 1: HACS
    • Option 2: Manual
    • Install Jupyter Kernel
  • Configuration
  • Tutorial
    • Jupyter Tutorial
    • Writing your first script
    • An example using triggers
  • Reference
    • Configuration
    • Reloading Scripts
    • State Variables
    • Calling services
    • Firing events
    • Function Decorators
      • @state_trigger
      • @time_trigger
      • @event_trigger
      • @mqtt_trigger
      • @task_unique
      • @state_active
      • @time_active
      • @service
    • Functions
      • State variables
      • Service Calls
      • Event Firing
      • Logging
      • Task sleep
      • Task unique
      • Task waiting
      • Task executor
      • Global Context
    • Advanced Topics
      • Workflow
      • Importing
      • Trigger Closures
      • Accessing YAML configuration
      • Access to Hass
      • Avoiding Event Loop I/O
      • Persistent State
      • Language Limitations
  • Contributing
  • New Features
  • Useful Links
Next

© Copyright 2020, Craig Barratt Revision 176f8747.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: stable
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.