Skip to content

feat: decode faults by name, expose HP/LP input, explain no-flow temperatures - #33

Merged
ccpk1 merged 1 commit into
mainfrom
ccpk1/issue30-faults-and-gating
Nov 8, 2026
Merged

ccpk1 merged 1 commit into
mainfrom
ccpk1/issue30-faults-and-gating

Conversation

@ccpk1

@ccpk1 ccpk1 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

Three follow-ups from the #30 investigation: fault reporting was showing a raw
bitmask word, the HP10 HP/LP pressure input was invisible, and "water temperature
is unavailable" gave no reason.

Faults are a bitmask, not a code

faults[] is a bitmask, so there is no single "fault code". The sensor was
showing the first non-zero word, and a state translation mapped 8 to
HP/HP5 from the HP table — wrong on HP10, where 8 is Defrost Sensor 2.

  • Active faults (was Fault code) now reports the decoded names, e.g.
    Compressor Fault, using the PID-appropriate table.
  • Attributes: faults (list), raw (words), pid.
  • No faults → no state, instead of a bare 0.
  • Diagnostics active_fault_code → active_faults, which is what it held.

HP10 HP/LP pressure input

HP10 ctrlFlags bit 2 is highPressureLowPressure, which the vendor app renders
as its own "HP/LP" status row. It is now a diagnostic binary sensor on HP10
units and reports unknown on HP, where no such bit exists.

Two caveats, stated plainly:

Water temperature reason

Without flow the value was already suppressed. It now also carries
unavailable_reason: no_flow, so "unavailable" is not mistaken for the device
being offline. This matches the app, which shows "No Flow" rather than a number.

Verification

  • ./utils/quick_lint.sh — clean
  • ./utils/run_tests.sh — 453 passed (was 445)

New tests: fault names for three fixtures, per-PID table divergence
(1 << 4 → Compressor Fault on 9985 vs Defrost Sensor 1 Open on 9984), the
sensor state and attributes, and the HP/LP flag being True on HP10 / None on
HP.

Behaviour changes: sensor.*_fault_code becomes *_active_faults with a
different state format; water temperature becomes unavailable without flow; a
new diagnostic binary sensor appears on HP10 units.

Related: #30

…-flow temps

A device's faults[] array is a bitmask, so "fault code" was never a meaningful
value: the sensor showed the raw first word, and a state map translated 8 to
"HP/HP5" using the HP table even on HP10 units where 8 is Defrost Sensor 2.

- hp_fault_code now reports the decoded fault names ("Compressor Fault") with
  faults/raw/pid attributes, decoded with the PID-appropriate table. A snapshot
  with no faults reports nothing instead of a bare 0.
- HP10 ctrlFlags bit 2 is the live highPressureLowPressure input, which the app
  renders as its own "HP/LP" status row. Exposed as a diagnostic binary sensor
  for HP10 only; it reports None on HP, where no such bit exists. This is
  distinct from the latched fault at faults[0] bit 6, and its exact meaning is
  still unconfirmed (Q2) - the point of exposing it is to collect that evidence.
- Water temperature already dropped to None without flow; it now also explains
  itself with unavailable_reason: no_flow, so "unavailable" is not mistaken for
  the device being offline.

Diagnostics rename active_fault_code -> active_faults, which is what it holds.

Tests: fault names for three fixtures, per-PID fault-table divergence, the
sensor state and attributes, and the HP/LP flag being True on HP10 and None on
HP. 453 pass (was 445).
@ccpk1 ccpk1 self-assigned this Nov 8, 2026
@ccpk1 ccpk1 added the enhancement New feature or request label Nov 8, 2026
@ccpk1
ccpk1 merged commit d87b347 into main Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant