Skip to main content

Hassette is a simple, modern, async-first Python framework for building Home Assistant automations.

Project description

Hassette

PyPI version Python 3.11+ License: MIT Documentation Status codecov

A simple, modern, async-first Python framework for building Home Assistant automations.

Documentation: https://hassette.readthedocs.io

✨ Why Hassette?

  • Type Safe: Full type annotations with Pydantic models and comprehensive IDE support
  • Async-First: Built for modern Python with async/await throughout
  • Dependency Injection: Clean handler signatures with FastAPI style dependency injection
  • Persistent Storage: Built-in disk cache for storing data across restarts, intelligent rate-limiting, and more
  • Simple & Focused: Just Home Assistant automations - no complexity creep
  • Web UI: Monitor and manage your automations from the browser
  • Developer Experience: Clear error messages, proper logging, hot-reloading, and intuitive APIs

See the Getting Started guide for detailed instructions.

🖥️ Web UI

Hassette includes a web UI for monitoring and managing your automations: Apps (app status, health, and detailed per-app views), Handlers (registered event handlers across all apps), Logs (real-time log streaming with filtering), and Config (runtime configuration and diagnostics).

Hassette Web UI — Apps page

The web UI is enabled by default at http://<host>:8126/ui/. See the Web UI documentation for details.

Terminal CLI

Query a running Hassette instance from the terminal — no browser required:

# Check system health
hassette status

# List all apps and their status
hassette app

# Investigate a specific app
hassette app health my-app
hassette listener --app my-app --since 1h
hassette log --app my-app --since 1h --limit 20

# Pipe structured output to jq
hassette listener --app my-app --json | jq '.[] | select(.failed > 0)'

See the CLI documentation for the full command reference, scripting patterns, and shell completion setup.

🤔 Is Hassette Right for You?

New to automation frameworks?

Coming from AppDaemon?

📖 Examples

Check out the examples/ directory for complete working examples:

Configuration examples:

🛣️ Status

Hassette is under active development. We follow semantic versioning and recommend pinning a minor version (e.g., hassette~=0.x.0) while the API stabilizes.

Open an issue or PR if you'd like to contribute!

Recent Highlights

  • Typed state models - Generated Python models for 45+ Home Assistant entity domains
  • Entity classes - Rich entity objects with built-in async methods (e.g., await light.turn_on())
  • Test harness - AppTestHarness for writing tests against your automations with simulated state and time control

🤝 Contributing

Contributions are welcome! Whether you're:

  • 🐛 Reporting bugs or issues
  • 💡 Suggesting features or improvements
  • 📝 Improving documentation
  • 🔧 Contributing code

See CONTRIBUTING.md for guidelines on getting started.

⭐ Star History

Star History Chart

📄 License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hassette-0.38.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hassette-0.38.0-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file hassette-0.38.0.tar.gz.

File metadata

  • Download URL: hassette-0.38.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for hassette-0.38.0.tar.gz
Algorithm Hash digest
SHA256 bc533ea68b005fd26c5fdb68927ca43ed142e12d7b23509f40246ec15de17287
MD5 bb4984a4b7af879051acd5c8583c50bc
BLAKE2b-256 9417070efe57dd1b64901126816df75bad0aa2f7961b69e5ce33e2583ac8b5e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hassette-0.38.0.tar.gz:

Publisher: release-please.yml on NodeJSmith/hassette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hassette-0.38.0-py3-none-any.whl.

File metadata

  • Download URL: hassette-0.38.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for hassette-0.38.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce5e0e0ee5545cb5a316cbf7070864e5ec35fbc1c4e365cd12a6a8e117e207f
MD5 da0db65d295b084f7d0d1181f567c063
BLAKE2b-256 db40222386622f1859e14a9716df58a63c6dfab5ea5611c4f0145454e36abd7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hassette-0.38.0-py3-none-any.whl:

Publisher: release-please.yml on NodeJSmith/hassette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page