Publish realtime analog values with three decimals, not one #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/realtime-analog-precision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Realtime pH/redox looked frozen in Home Assistant
Calibration.Applyrounded the calibrated analog value to one decimal (copied from the vendor apps display rounding). For pH that is too coarse — a real value drifting through 7.25–7.29 all rounds to7.3`. Since realtime publishing is change-driven, the rounded value never changes, nothing is published, and the HA entity looks frozen for minutes while the app shows it moving.Round to three decimals (full sensor precision) instead: pH raw 413 →
7.17, redox raw 580 →543.968.getStatsvalues are unaffected (already calibrated, never go throughApply).Tests, docs and the calibration examples updated.
go build,go test ./...,golangci-lint v2.12.2all clean.b3a6d7f389c8de2b6885Publish realtime analog values with two decimals, not oneto Publish realtime analog values with three decimals, not one