Development¶
This project uses uv for Python dependency management and targets modern Home Assistant versions.
Prerequisites¶
- Python 3.11+ (managed by
uvduring setup) uvinstalled (pip install uvif you do not have it yet)- Home Assistant core development dependencies (installed via
make install)
Setup¶
This syncs all dev dependencies using uv.
Common tasks¶
| Task | Command |
|---|---|
| Format code | make format |
| Lint (ruff, mypy, bandit) | make lint |
| Run tests | make test |
| Start HA dev instance | make develop |
| Clean caches | make clean |
Running Home Assistant for local testing¶
make develop launches Home Assistant with the repository as custom_components and stores configuration under ./config. A minimal secrets.yaml is created if missing. Access the UI at http://localhost:8123.
Debug logging¶
Enable verbose logging while developing:
Documentation¶
Docs live under docs/ and are built with MkDocs Material. To preview locally:
The site URL and deployment are managed separately in the m7kni-net-site repo; this project just provides the sources.
Pull request checklist¶
- New/changed entities documented under
docs/ -
make lintandmake testpass - New services or options have translations and
services.yamlentries - Add or update tests where appropriate