A teammate’s pull request adds a wrapper that remembers the last good reading and returns it when the probe drops out, so the dashboard holds steady instead of flickering. It wraps the calibrated sensor, which both readers use. Since it went to staging, a grower reports that the frost alert said “ok” all through a night the probe was unplugged, and the night shift saw a 0.0 °C frost page right after a restart.
A frost alert that can’t tell “warm” from “not measuring” is worse than none: the grower trusts it. And a reading of 0.0 that was never measured pages people at night.
Reproduce
Probe reads 3.1, then drops out. Two frost checks: the second should say frost check: probe offline; today it says ok: 3.1°C again. After a restart with the probe offline, the dashboard shows bench 3: 0.0°C.
Acceptance criteria
- The dashboard keeps showing the last good reading while the probe drops out, and the current one once it is back.
- The frost alert reports a dropout the moment it happens.
- Before any good reading, nothing invents one: both readers report the probe offline.
- Calibration and the partner site’s Fahrenheit dashboard still work as before.
Notes
- Each case scripts the probe, calls setup with a calibration and a unit, then reads in order; the results print joined by “ | ”.
- Keep the names and signatures of setup, the readers and the wrappers. Keep the wrapper only where its reader wants it.