v2 Phase 6 (step 1): Home Assistant REST client + live self-test

daemon/ha_client.py: HAClient (brightness, color_temp, on/off, state snapshot)
over the HA REST API with smooth `transition`; token is read from a local
%LOCALAPPDATA%\Clawdmeter\ha_config.json and is never logged. Verified
end-to-end against a real Gledopto GL-C-006P tunable-white dimmer.

ha_config.example.json is the committed template; the real config (with the
token) lives outside the repo and is .gitignored as a safety net.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wenil
2026-06-21 16:33:38 +03:00
co-authored by Claude Opus 4.8
parent 39a24eebad
commit a6d391e9d1
3 changed files with 229 additions and 0 deletions
+3
View File
@@ -27,3 +27,6 @@ __pycache__/
/build/
/dist/
*_dbg.spec
# Local Home Assistant config (holds a secret token - never commit)
daemon/ha_config.json