Commit 07eaf1b
fix: EVC cumulative energy word order + unreachable modbus_min=101 gates
1. EV charger cumulative energy (0x0010 EQ_Total, input u32): the charger
transmits this register high-word-first, contradicting the doc
(EVC_Modbus_V3.5: 0x10=Lo / 0x11=Hi) and the same counter's
little-ordered holding copy at 0x0619. Raw 3 (0.3 kWh) displayed as
19660.8 kWh. Adds an optional per-sensor order32 override to
BaseModbusSensorEntityDescription (the read path already honored it via
getattr; only the dataclass field was missing) and sets order32="big"
on charge_added_cum.
2. modbus_min=101 gates made a dozen entities unreachable: register 0x82
reports the protocol version (100 = V001.00) and no known device
returns more than 100 - the 101/102 values conflated the protocol
register with the document revision (see the discussion on #2064).
Raw register reads on a real protocol-100 device confirm all affected
registers respond with sensible data (bias_power, peakshaving
discharge limits, EV charger / AdapterBox communication states - the
latter correctly reporting an actually-connected EV charger). Gates
relaxed to 100 and the misleading dataclass comments corrected.
The reactive-power registers (0xDE/0xE0, modbus_min=102) are
intentionally NOT touched: relaxing them requires resolving their
overlap with the 0xC0/0xC2 S32 variants, which needs hardware
coverage this PR does not have.
Verified live on X3 EVC 11kW and X3-Hybrid-G4 15kW.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 2178c86 commit 07eaf1b
3 files changed
Lines changed: 26 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
| 256 | + | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | | - | |
272 | | - | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
292 | | - | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
311 | | - | |
| 311 | + | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
339 | | - | |
340 | | - | |
| 340 | + | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
2286 | | - | |
| 2286 | + | |
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
| |||
2511 | 2511 | | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | | - | |
| 2514 | + | |
2515 | 2515 | | |
2516 | 2516 | | |
2517 | 2517 | | |
| |||
2525 | 2525 | | |
2526 | 2526 | | |
2527 | 2527 | | |
2528 | | - | |
| 2528 | + | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | 2531 | | |
| |||
2551 | 2551 | | |
2552 | 2552 | | |
2553 | 2553 | | |
2554 | | - | |
| 2554 | + | |
2555 | 2555 | | |
2556 | 2556 | | |
2557 | 2557 | | |
| |||
2565 | 2565 | | |
2566 | 2566 | | |
2567 | 2567 | | |
2568 | | - | |
| 2568 | + | |
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
| |||
4421 | 4421 | | |
4422 | 4422 | | |
4423 | 4423 | | |
4424 | | - | |
| 4424 | + | |
4425 | 4425 | | |
4426 | 4426 | | |
4427 | 4427 | | |
| |||
5230 | 5230 | | |
5231 | 5231 | | |
5232 | 5232 | | |
5233 | | - | |
| 5233 | + | |
5234 | 5234 | | |
5235 | 5235 | | |
5236 | 5236 | | |
5237 | 5237 | | |
5238 | 5238 | | |
5239 | 5239 | | |
5240 | 5240 | | |
5241 | | - | |
| 5241 | + | |
5242 | 5242 | | |
5243 | 5243 | | |
5244 | 5244 | | |
| |||
5252 | 5252 | | |
5253 | 5253 | | |
5254 | 5254 | | |
5255 | | - | |
| 5255 | + | |
5256 | 5256 | | |
5257 | 5257 | | |
5258 | 5258 | | |
5259 | 5259 | | |
5260 | 5260 | | |
5261 | 5261 | | |
5262 | 5262 | | |
5263 | | - | |
| 5263 | + | |
5264 | 5264 | | |
5265 | 5265 | | |
5266 | 5266 | | |
| |||
7692 | 7692 | | |
7693 | 7693 | | |
7694 | 7694 | | |
7695 | | - | |
| 7695 | + | |
7696 | 7696 | | |
7697 | 7697 | | |
7698 | 7698 | | |
| |||
7706 | 7706 | | |
7707 | 7707 | | |
7708 | 7708 | | |
7709 | | - | |
| 7709 | + | |
7710 | 7710 | | |
7711 | 7711 | | |
7712 | 7712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
| 1138 | + | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | 1141 | | |
| |||
0 commit comments