Commit 7b74812
committed
External Generator: own sub-device with dependency-driven availability
The 33 generator entities were gated by the Dry Contact Box option, which
is a different feature - in the SolaX app the external generator is its
own tree. They move to a "<hub> External Generator" device behind a new
"External Generator Support" option (read_gen, off by default, translated
in all shipped languages), and each entity only exists while its parent in
that tree is active:
External Generator (0xC7): Disabled | ATS Control | Dry Contact
Start Gen Method (0xE3): only with Dry Contact
Switch On/Off SoC (0xE4/0xE5): only with Reference SOC
Max Run Time (0xE6), Max Rest Time (0xE7), Hold Min Power (0x10E)
Allow Work Start/Stop Time (0xE8/0xE9), Max Charge (0xC8)
Charge Battery from Generator (0x109 on Gen4, 0x10C on Gen5/Gen6)
Charge Battery To (0x10A on Gen4, 0x10D on Gen5/Gen6)
Schedule 2 (0x104 on Gen4, 0x107 on Gen5/Gen6): unlocks the second
Charge Period and Allowed Discharge Period time pair
Names follow the cloud app now that the device provides the context, with
keys and entity ids unchanged: Generator Max Charge -> Max Charge (in kW,
0.01 scale, 0-300 kW instead of a raw 10 W register), Generator Charge ->
Charge Battery from Generator, Generator Min Power -> Hold Min Power,
Generator Time 2 -> Schedule 2, Generator Charge SOC -> Charge Battery To.
Verified live on an X3-Hybrid-G4 15kW by changing each setting in the
SolaX app and tracking the readbacks.
Stacked on the sub-device infrastructure PR.1 parent 27c579d commit 7b74812
13 files changed
Lines changed: 210 additions & 111 deletions
File tree
- custom_components/solax_modbus
- translations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
| 454 | + | |
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
| 460 | + | |
453 | 461 | | |
454 | 462 | | |
455 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| 383 | + | |
| 384 | + | |
379 | 385 | | |
380 | 386 | | |
381 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments