The avg key summarizes healthy probes for quick glances and compact history rows. Averaging should ignore failed reads and optionally weight only probes marked active in firmware.
Algorithm sketch
- Collect valid temperature and humidity pairs for each probe index.
- Compute arithmetic mean separately for °F, °C, and humidity.
- If only one probe is healthy, avg may equal that probe or be omitted—pick one policy.
When not to trust avg
Door-adjacent and interior zones can differ by ten degrees—blind averaging hides freeze risk in the cold corner. Use avg for trend lines; use per-zone keys for decisions. Layout: multi-zone layout.
Related topics
Polling cadence: sketch main loop. Output shape: JSON schema.