Commit 157bed8
authored
feat(ha): dynamic SoC icon reflects charging state (#458)
Adds icon_template to the SoC MQTT discovery payload so HA renders
mdi:battery-charging-{N} when the vehicle is charging and the standard
mdi:battery-{N} icons otherwise. Thresholds match HA's native battery
device_class icon mapping. Requires HA 2024.x for icon_template support
in MQTT sensor discovery.1 parent 35f1dcf commit 157bed8
2 files changed
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
135 | 164 | | |
136 | 165 | | |
137 | 166 | | |
138 | 167 | | |
139 | 168 | | |
140 | 169 | | |
| 170 | + | |
141 | 171 | | |
142 | 172 | | |
143 | 173 | | |
| |||
0 commit comments