skillfed

zha

Library implementing ZHA for Home Assistant

zha v2.1.0 76.4K downloads/30d#14,624 on PyPI94
Permissive license Apache-2.0 Active released

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 zha

uv

uv add zha

poetry

poetry add zha

Installing 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

zigbee gateway home automationzigbee device coordinatorzigbee network managementzigbee radio abstractionhome assistant zigbee integrationzigbee device pairingzigbee mesh networking
home-automationzigbeeiot

More Networking packages