HA entity, sensor and device classes (iteration 2, step 3)
HaEntity describes an entity for device-based discovery, throttles its state (SEN-14) and reports availability (SEN-15); HaSensor is the `sensor` type. HaDevice publishes discovery, availability and states after each connect and after HA's birth message, provides the last will and removes itself from HA. Unit tests with a fake MQTT client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+7
-2
@@ -23,8 +23,9 @@ CLAUDE.md ("Working rules").
|
||||
The error itself is covered off the device by `tst_config`. Checks 3 and 4 run in the next
|
||||
session on the Frame (iteration 2 testing needs it too).
|
||||
- **Implementation** follows the order in DESIGN.md (steps 1–7). Steps 1 (libmosquitto in
|
||||
CMake and the containers) and 2 (`MqttClient`, `MosquittoClient`, `tst_mqtt`) done; next:
|
||||
step 3 (`HaEntity`, `HaSensor`, `HaDevice`, unit tests).
|
||||
CMake and the containers), 2 (`MqttClient`, `MosquittoClient`, `tst_mqtt`) and 3
|
||||
(`HaEntity`, `HaSensor`, `HaDevice`, unit tests) done; next: step 4 (app wiring,
|
||||
`--desktop-novr`, UI-1).
|
||||
|
||||
## Next steps
|
||||
|
||||
@@ -144,6 +145,10 @@ Known limitation: the bundled-Qt package does not support WebEngine in this iter
|
||||
host 3 × 12/12; `container-test.sh` 9/9 (Debian's libmosquitto 2.0.21), no Vulkan
|
||||
validation messages; cross build: private Qt symbols only `QVulkan*`, at most
|
||||
`GLIBC_2.34`; the app binary links libmosquitto only from step 4 on (first use).
|
||||
- Step 3: `HaEntity` (description, discovery component, throttling, availability),
|
||||
`HaSensor`, `HaDevice` (discovery payload, publish all after connect and after HA's birth
|
||||
message with random delay, last will, `removeFromHa()`), `FakeMqttClient` for tests.
|
||||
`tst_haentity` 11/11, `tst_hadevice` 14/14 on the host.
|
||||
|
||||
### 2026-10-05: requirements approved
|
||||
|
||||
|
||||
Reference in New Issue
Block a user