{"id":28392777,"url":"https://github.com/zigpy/zha","last_synced_at":"2026-01-28T19:06:04.429Z","repository":{"id":230121799,"uuid":"769727949","full_name":"zigpy/zha","owner":"zigpy","description":"Zigbee Home Automation","archived":false,"fork":false,"pushed_at":"2025-06-24T23:04:54.000Z","size":2567,"stargazers_count":51,"open_issues_count":89,"forks_count":45,"subscribers_count":11,"default_branch":"dev","last_synced_at":"2025-06-24T23:29:36.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zigpy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-09T22:09:44.000Z","updated_at":"2025-06-24T23:04:50.000Z","dependencies_parsed_at":"2024-11-24T21:25:55.029Z","dependency_job_id":"69e1ddb2-c736-4e48-9e37-5c4560215591","html_url":"https://github.com/zigpy/zha","commit_stats":null,"previous_names":["zigpy/zha"],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/zigpy/zha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigpy%2Fzha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigpy%2Fzha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigpy%2Fzha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigpy%2Fzha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zigpy","download_url":"https://codeload.github.com/zigpy/zha/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigpy%2Fzha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261780458,"owners_count":23208633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-31T15:08:14.910Z","updated_at":"2025-12-29T05:32:23.136Z","avatar_url":"https://github.com/zigpy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zigbee Home Automation (ZHA)\n\n[![CI](https://github.com/zigpy/zha/actions/workflows/ci.yml/badge.svg)](https://github.com/zigpy/zha/actions/workflows/ci.yml)\n[![Coverage Status](https://codecov.io/gh/zigpy/zha/branch/dev/graph/badge.svg)](https://app.codecov.io/gh/zigpy/zha/tree/dev)\n[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?logo=python)](https://www.python.org)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![PyPI version](https://badge.fury.io/py/zha.svg)](https://badge.fury.io/py/zha)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-yellow.svg)](https://opensource.org/license/apache-2-0)\n\n\nZHA 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.\n\n## Key Features\n\n- **Hardware Independence:** ZHA is not tied to any specific hardware, giving you the freedom to choose the Zigbee radio that best suits your needs.\n- **Compatibility:** ZHA supports a vast array of Zigbee-based devices, ensuring seamless integration with popular home automation and lighting solutions.\n- **Unified Zigbee Network:** By utilizing ZHA, you can establish a single Zigbee network, simplifying device management and enhancing interoperability.\n- **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.\n\n## Getting Started With Development\n\nTo bootstrap a development environment for ZHA, follow these steps:\n\n1. Clone the project from the [zigpy](https://github.com/zigpy) organization:\n\n    ```shell\n    git clone https://github.com/zigpy/zha.git\n    ```\n\n2. Navigate to the `script` directory:\n\n    ```shell\n    cd zha/script\n    ```\n\n3. Run the setup script to install the necessary dependencies:\n\n    ```shell\n    ./setup\n    ```\n\n    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.\n    \u003cdetails\u003e\n    \u003csummary\u003eScript Overview\u003c/summary\u003e\n\n    The `setup` script in the `zha/script` directory performs the following actions:\n\n    - `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.\n\n    - `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.\n\n    - `. 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.\n\n    - `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.\n\n    - `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.\n\n    - `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.\n\n    - `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.\n    \u003c/details\u003e\n\n4. 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:\n\n    ```shell\n    python -m tools.regenerate_diagnostics\n    ```\n\n## License\n\nZHA is released under the [Apache 2.0 License](https://opensource.org/license/apache-2-0). Please refer to the LICENSE file for more details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigpy%2Fzha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigpy%2Fzha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigpy%2Fzha/lists"}