Commit 1488b0f
committed
Fix influx-v2 missing dep, boolean conversion, and connectivity persistence
1. Add missing @influxdata/influxdb-client dependency: the influx-v2
plugin imports it but it wasn't in package.json, blocking
generate:openapi on CI. Pre-existing issue on main.
2. Fix boolean conversion for all device types: convertValueForZigbee
only converted booleans for the 'state' key. Other boolean-typed
properties (lock_state, fan_state, etc.) also need conversion since
toZigbee converters expect strings ("ON"/"OFF", "LOCK"/"UNLOCK").
Now converts all boolean values regardless of key name.
3. Fix optimistic lastDbState update: was set before the DB write,
so if setConnectionState threw or the device wasn't adopted yet,
the state was marked as persisted and never retried. Now only
updates lastDbState after successful setConnectionState call.
Failed writes and unadopted devices will retry on the next cycle.
https://claude.ai/code/session_014bjB9Cn1WKASNLBeCuSbom1 parent ca6990a commit 1488b0f
4 files changed
Lines changed: 28 additions & 18 deletions
File tree
- apps/backend
- src/plugins/devices-zigbee-herdsman
- platforms
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments