Load this document when changing CCU communication, CLI behavior, configuration,
or tests. Repository-wide workflow rules remain in ../AGENTS.md.
CCU communication uses
hahomematic, formerly aiohomematic.
Local documentation is under llms/aiohomematic/:
getting_started.md: basic usagearchitecture.md: component relationshipscommon_operations.md: frequent operationsdata_flow.md: data movementevent_bus.md: event patternsglossary.md: terminology
Read the relevant pages before changing hahomematic integration. Refresh them
with ./llms/sync.sh.
Use test-driven development for behavior changes: establish a failing focused test, implement the behavior, then refactor with the test green.
| Layer | Test boundary |
|---|---|
CCUBackend |
mock the external backend with unittest.mock |
| CLI | invoke commands with click.testing.CliRunner; mock get_backend |
| Configuration | temporary files plus monkeypatch and tmp_path |
| ReGa HTTP | httpx.MockTransport; do not create a full mock server |
Test observable behavior, not library behavior or internal implementation details.
uv run pytest
uv run pytest -v
uv run pytest tests/test_cli.py
uv run pytest -k "test_devices"This is a user-invoked Python CLI. Keep the src/ layout. Configuration resolves
from environment, then configured key command, then an explicit setup hint.
Versioning is release/tag driven rather than duplicated manually. Do not
self-update; show an upgrade command. Explicitly include non-Python package data
in the build configuration.