Commit 3eb7d93
fix(mqtt): correct HA state topics and allow DEVICE_NAME env override
The HA discovery config for the Confidence and Detection Time sensors
declared state_topics using an underscore (clouddetect_<id>_confidence)
that did not match where publish_states() actually publishes
(clouddetect_<id>/confidence). The sensors never received state. Aligned
the config state_topics to use the slash form so they match.
Also set AlpacaConfig.device_name default to an empty string so
resolve_detect_overrides()'s pick() falls through to the DEVICE_NAME
env var. The non-empty static default previously masked the env var.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 732e509 commit 3eb7d93
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
0 commit comments