Skip to content

fix: alarm sensor false-positive when alarm code is 0 - #19

Open
chrisjohnson00 wants to merge 1 commit into
SPD13:mainfrom
chrisjohnson00:issue-17
Open

fix: alarm sensor false-positive when alarm code is 0#19
chrisjohnson00 wants to merge 1 commit into
SPD13:mainfrom
chrisjohnson00:issue-17

Conversation

@chrisjohnson00

@chrisjohnson00 chrisjohnson00 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Alarm binary sensor combined an unreliable top-level alarm API flag with the alarm_code (s20) fault bitfield via OR, so a truthy-but-benign top-level flag could report PROBLEM even when alarm_code was 0 (no fault).
  • Derive the Alarm sensor's state solely from alarm_code != 0, matching how the reference pypentair library treats this same cloud API (no top-level alarm key; s20 is the authoritative fault code).
  • Removed the unreliable top-level alarm field entirely (init, population, debug logging) so it can't be misread again.

Fixes #17

Proof of test

I replaced the modified files, locally, and now the alarm sensor shows off, and my dashboard shows "OK"

image image

The Alarm binary sensor OR'd an unreliable top-level "alarm" API flag
with the alarm_code bitfield, so a truthy-but-benign top-level flag
could report PROBLEM even when alarm_code (s20) was 0 (no fault).
Drop the top-level flag and derive the sensor solely from alarm_code.

Fixes SPD13#17
@chrisjohnson00
chrisjohnson00 marked this pull request as ready for review July 17, 2026 01:40
@chrisjohnson00

Copy link
Copy Markdown
Contributor Author

@SPD13 - ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

showing alarm when alarm code is 0

1 participant