1
0
Fork
You've already forked zha
0
No description
  • Python 100%
dependabot[bot] 7754950897
Bump zha-quirks from 0.0.154 to 0.0.156 ( #644 )
Bumps [zha-quirks](https://github.com/zigpy/zha-device-handlers) from 0.0.154 to 0.0.156.
- [Release notes](https://github.com/zigpy/zha-device-handlers/releases)
- [Commits](https://github.com/zigpy/zha-device-handlers/compare/0.0.154...0.0.156)
---
updated-dependencies:
- dependency-name: zha-quirks
 dependency-version: 0.0.156
 dependency-type: direct:production
 update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026年02月04日 09:30:17 +01:00
.github Fix CI: deprecated event_loop fixture ( #464 ) 2025年06月12日 17:17:23 -04:00
.vscode Initial project creation ( #1 ) 2024年03月10日 10:18:14 -04:00
script Update script/setup to detect current environment ( #395 ) 2025年03月14日 19:15:39 +01:00
tests Emit OnOffClientClusterHandler attribute_updated events first ( #642 ) 2026年02月03日 16:40:33 +01:00
tools Zigpy 0.91.0: attribute events, manufacturer codes, and signature fixes ( #605 ) 2026年01月27日 21:23:41 -05:00
zha Emit OnOffClientClusterHandler attribute_updated events first ( #642 ) 2026年02月03日 16:40:33 +01:00
.gitignore Import device testing data from ZHA device diagnostics JSON and GitHub ( #437 ) 2025年04月29日 15:41:02 -04:00
.pre-commit-config.yaml Auto-update pre-commit hooks ( #619 ) 2026年01月16日 12:59:38 -05:00
LICENSE Relicense to Apache 2.0 ( #61 ) 2024年07月05日 17:46:10 -04:00
pyproject.toml Bump zha-quirks from 0.0.154 to 0.0.156 ( #644 ) 2026年02月04日 09:30:17 +01:00
README.md Consolidate device diagnostics and create a tool to regenerate them ( #284 ) 2025年04月24日 13:47:44 -04:00
requirements_test.txt Fix test compatibility with looptime 0.7 ( #612 ) 2026年01月03日 20:07:39 +01:00
setup.py Initial project creation ( #1 ) 2024年03月10日 10:18:14 -04:00

Zigbee Home Automation (ZHA)

CI Coverage Status python pre-commit PyPI version License: Apache 2.0

ZHA is a versatile and hardware-independent Zigbee gateway implementation, designed to replace proprietary Zigbee gateways, bridges, hubs, and controllers. With ZHA, you can create a unified Zigbee network, allowing you to easily pair and connect a wide range of Zigbee-based devices for home automation and lighting.

Key Features

  • Hardware Independence: ZHA is not tied to any specific hardware, giving you the freedom to choose the Zigbee radio that best suits your needs.
  • Compatibility: ZHA supports a vast array of Zigbee-based devices, ensuring seamless integration with popular home automation and lighting solutions.
  • Unified Zigbee Network: By utilizing ZHA, you can establish a single Zigbee network, simplifying device management and enhancing interoperability.
  • Low-Bandwidth Communication: Zigbee operates on a low-bandwidth communication protocol, utilizing small, low-power digital radios to connect devices within local Zigbee wireless private area networks.

Getting Started With Development

To bootstrap a development environment for ZHA, follow these steps:

  1. Clone the project from the zigpy organization:

    git clone https://github.com/zigpy/zha.git
    
  2. Navigate to the script directory:

    cd zha/script
    
  3. Run the setup script to install the necessary dependencies:

    ./setup
    

    The setup script sets up a virtual environment, installs necessary packages and dependencies, and configures pre-commit hooks for the project. It helps ensure a consistent and controlled development environment for the project, saving you time and effort.

    Script Overview

    The setup script in the zha/script directory performs the following actions:

    • curl -LsSf https://astral.sh/uv/install.sh | sh: This command uses curl to download a shell script from the specified URL (https://astral.sh/uv/install.sh) and then pipes it to the sh command to execute it. This script is responsible for installing a tool called "uv" (short for "universal virtualenv") which helps manage Python virtual environments.

    • uv venv venv: This command uses the "uv" tool to create a new Python virtual environment named "venv" in the current directory. A virtual environment is an isolated Python environment that allows you to install packages and dependencies specific to your project without affecting the global Python installation.

    • . venv/bin/activate: This command activates the newly created virtual environment. When a virtual environment is activated, any subsequent Python-related commands will use the Python interpreter and packages installed within that environment.

    • uv pip install -U pip setuptools pre-commit: This command uses the "uv" tool to upgrade the "pip" package manager, as well as install or upgrade the "setuptools" and "pre-commit" packages. "pip" is the default package manager for Python, "setuptools" is a library that facilitates packaging Python projects, and "pre-commit" is a tool for managing and enforcing pre-commit hooks in a Git repository.

    • uv pip install -r requirements_test.txt: This command uses the "uv" tool to install the Python packages listed in the "requirements_test.txt" file. This file typically contains a list of dependencies required for running tests in the project.

    • uv pip install -e .: This command uses the "uv" tool to install the project itself in editable mode. The dot (.) represents the current directory, so this command installs the project as a package in the virtual environment.

    • pre-commit install: This command installs Git pre-commit hooks for the project. Pre-commit hooks are scripts that run before each commit is made in a Git repository, allowing you to enforce certain checks or actions before committing changes.

  4. If creating new entities or modifying existing ones, unit tests that use device diagnostic files will fail. You can regenerate existing device diagnostic JSON files to incorporate the new entities:

    python -m tools.regenerate_diagnostics
    

License

ZHA is released under the Apache 2.0 License. Please refer to the LICENSE file for more details