Commit c23f4fb
committed
Don't let an ambiguous cause code raise a fault
Two review findings on the new appliance-status and electricity metadata.
The cause-only fallback kept the first-seen mapping when several display
codes share a cause. Nine causes have display variants that disagree, and
two of them turn a normal state into a fault: cause 273 is a 24h safety
shutdown under display 3F but flame monitoring under 0U, and 280 is a
restart-time fault under 7L but a fan start under 0U. 0U codes 270-274,
280 and 281 are the normal ignition sequence, so a boiler that is merely
starting up with no display code would report a safety shutdown. Build
the fallback only from causes whose variants agree; ambiguous ones read
unknown and keep their raw codes on the entity attributes.
Also revert the electricity dayAverage/monthAverage promotion to
device_class=ENERGY + state_class=TOTAL + last_reset. The paths are named
average, and an average that falls as well as rises is not a TOTAL: HA
reads each decrease as a meter reset and the sensor becomes selectable as
an Energy Dashboard source. Wrong long-term statistics are painful to
unwind, so these stay plain sensors until someone watches the value
across a full day on real hardware.1 parent 2b4f3fc commit c23f4fb
2 files changed
Lines changed: 63 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | | - | |
| 186 | + | |
182 | 187 | | |
183 | | - | |
184 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
| |||
785 | 794 | | |
786 | 795 | | |
787 | 796 | | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | 797 | | |
795 | 798 | | |
796 | 799 | | |
| |||
1473 | 1476 | | |
1474 | 1477 | | |
1475 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1476 | 1486 | | |
1477 | 1487 | | |
1478 | 1488 | | |
1479 | 1489 | | |
1480 | 1490 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
| 1491 | + | |
| 1492 | + | |
1491 | 1493 | | |
1492 | 1494 | | |
1493 | 1495 | | |
1494 | | - | |
| 1496 | + | |
1495 | 1497 | | |
1496 | 1498 | | |
1497 | 1499 | | |
1498 | 1500 | | |
1499 | 1501 | | |
1500 | | - | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | 1502 | | |
1506 | 1503 | | |
1507 | 1504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
201 | 215 | | |
202 | 216 | | |
203 | 217 | | |
| |||
453 | 467 | | |
454 | 468 | | |
455 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
456 | 491 | | |
457 | 492 | | |
458 | 493 | | |
| |||
0 commit comments