zha
Library implementing ZHA for Home Assistant
What it is and what it does
ZHA is a Zigbee gateway library that abstracts hardware differences and provides a unified interface for managing Zigbee networks and devices. It sits between Home Assistant and various Zigbee radio adapters (bellows, zigpy-znp, zigpy-deconz, zigpy-xbee, zigpy-zigate, zigpy-ziggurat), allowing you to pair and control Zigbee-based home automation devices without being locked into a specific hardware gateway or proprietary bridge.
The package depends on zigpy as its core protocol layer and includes support for multiple radio types through separate adapter libraries. It handles device discovery, pairing, and network coordination over low-bandwidth Zigbee mesh networks. The library is actively maintained and designed to work within Home Assistant's ecosystem, though it can be used standalone if you understand the underlying zigpy architecture.
Use it for:
- Replace a proprietary Zigbee hub with a software-based gateway on existing hardware
- Integrate diverse Zigbee devices (lights, switches, sensors) into a unified home automation network
- Support multiple Zigbee radio types on a single system without vendor lock-in
- Manage Zigbee device pairing, routing, and network topology in Home Assistant
- Build custom Zigbee applications on top of zigpy's protocol abstraction
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
ZHA is a hardware-independent Zigbee gateway implementation that manages Zigbee devices and networks for home automation, supporting a wide range of Zigbee radio types and device integrations.
Yes, if you are using Home Assistant and need Zigbee device support. The package is actively maintained, has no known vulnerabilities, and low install friction. It is purpose-built for Home Assistant integration; standalone use requires familiarity with zigpy and radio adapter configuration. The permissive Apache 2.0 license poses no deployment concerns.
Install
zha on PyPI
pip
pip install zhauv
uv add zhapoetry
poetry add zhaInstalling zha
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release (16 days old) and ongoing repository activity. Requires Python 3.12 or later.
License in practice
Released under Apache 2.0, a permissive license allowing commercial and private use with minimal restrictions—suitable for most deployment scenarios.
Quickstart
pip install zha
import zha
# ZHA is typically integrated into Home Assistant; direct library usage requires zigpy and radio-specific adapters (bellows, zigpy-znp, etc.)
Requires Python 3.12 or later. Intended primarily as a Home Assistant integration; standalone library use requires understanding of zigpy architecture and radio adapter setup.
Verify before relying
- Specific Zigbee device compatibility list and supported radio hardware models
- Performance characteristics under typical home automation loads
- Network scalability limits (number of devices, mesh depth)
- Integration requirements and API stability for non-Home Assistant use
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — attrs, frozendict, bellows, zigpy-znp, zigpy-deconz, zigpy-xbee, zigpy-zigate, zigpy-ziggurat, zigpy |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,446/month — #14,624 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zha-2.1.0-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
zigpy-znpAdds support for Texas Instruments ZNP Zigbee…
copyleft · top 15,000 on PyPI
zha-quirksProvides custom device handlers (quirks) for…
permissive · top 15,000 on PyPI
zigpyzigpy is a hardware-independent Zigbee protocol…
copyleft · top 15,000 on PyPI
zigpy-xbeeEnables zigpy to communicate with XBee-based…
copyleft · top 15,000 on PyPI
zigpy-zigateProvides a Python 3 driver for ZiGate Zigbee…
copyleft · top 15,000 on PyPI
pydeconzPython library that wraps the deCONZ REST API…
permissive · top 15,000 on PyPI
midea-localControl Midea M-Smart appliances over local…
permissive · top 15,000 on PyPI
bellowsbellows is a Python library that implements the…
copyleft · top 15,000 on PyPI
zigpy-deconzProvides a Python interface to deCONZ-based…
copyleft · top 15,000 on PyPI
boschshcpyPython client library for the Bosch Smart Home…
permissive · top 15,000 on PyPI