Food Temperature Monitoring — Design Spec¶
Date: 2026-06-08 Status: Implemented 2026-06-08 — see docs/superpowers/plans/2026-06-08-food-temperature-monitoring.md
Goal¶
Monitor the three new garage temperature/humidity sensors (refrigerator, refrigerator freezer, deep freezer) on the Home Command Dashboard and alert when any unit runs unsafely warm — with debounce logic that ignores the brief warm spikes caused by opening the door / loading food, so alerts only fire on real problems.
Hardware / Entities¶
Three ThirdReality 3RTHS0224Z temp+humidity Zigbee sensors, all in the Garage area, reporting in °F. Entity IDs were normalized on 2026-06-08 (the refrigerator sensor had kept its default third_reality_inc_3rths0224z_* slug; renamed via the HA WebSocket entity-registry API to match the others).
| Appliance | Temperature entity | Battery entity | Reading 2026-06-08 |
|---|---|---|---|
| Refrigerator | sensor.refrigerator_temperature_sensor_temperature | sensor.refrigerator_temperature_sensor_battery | 45°F |
| Refrigerator Freezer | sensor.refrigerator_freezer_temperature_sensor_temperature | sensor.refrigerator_freezer_temperature_sensor_battery | 6°F |
| Deep Freezer | sensor.freezer_temperature_sensor_temperature | sensor.freezer_temperature_sensor_battery | -3°F |
Each device also exposes _humidity, _lqi, _rssi, offset number.*, an identify button.*, and a firmware update.* (all renamed to the clean slug). Only temperature and battery are used by this feature.
Thresholds (°F)¶
The food-safety hazard is the temperature rising (warming → spoilage). Two alert tiers per appliance, each time-debounced so transient spikes self-clear. Numbers are starting points and tunable.
| Appliance | 🟢 Green ceiling / recover line | 🟡 Soft tier | 🔴 Hard tier |
|---|---|---|---|
| Refrigerator | 40°F | > 42°F for 45 min | > 52°F for 10 min |
| Refrigerator Freezer | 10°F | > 10°F for 60 min | > 25°F for 15 min |
| Deep Freezer | 5°F | > 5°F for 60 min | > 20°F for 20 min |
The green ceiling is the food-safe line (also the all-clear / recover threshold) — not the ideal setpoint. Ideal is ≤ 0°F for both freezers, but frozen food stays safe up to ~10°F, so the freezers read green up to their ceiling. The fridge has a 2°F buffer between its green ceiling (40°F) and soft alert (42°F); the freezers' soft alert sits at the green ceiling (no buffer), so a sustained drift just past green is what trips the soft tier.
Rationale: freezers get longer soft windows (large thermal mass, frozen food stays safe well below the air-temp reading, opened far less than the fridge). The hard tier uses a short window because being that warm even briefly is never normal (door left open, power loss, compressor failure).
Debounce behavior (scenarios)¶
- Loading groceries — door open ~3 min, air sensor spikes ~55°F, recovers to ~38°F within ~15 min. Soft needs 45 min sustained → no fire. Hard needs >52°F for a full 10 min → spike clears first → no fire. Silent. ✅
- Door left ajar — climbs to ~48°F and holds → soft fires at 45 min. If it climbs past 52°F, hard fires first at 10 min. ✅
- Power/compressor failure — ramps to 60°F over an hour → hard tier catches it early in the climb. ✅
Components¶
1. Dashboard — Climate tab, new "🧊 Food Temperature" section¶
Three custom:button-card tiles (one per appliance), styled like the existing FLF moisture tiles: large temperature value, color-coded card background, status label. Color bands align with the alert tiers so the tile turns red exactly when the critical tier is in play.
| Tile | 🟢 Green (safe) | 🟡 Yellow (soft) | 🔴 Red (hard) |
|---|---|---|---|
| Refrigerator | ≤ 40°F | 40–52°F | > 52°F |
| Refrigerator Freezer | ≤ 10°F | 10–25°F | > 25°F |
| Deep Freezer | ≤ 5°F | 5–20°F | > 20°F |
- Label text:
Good · {temp}°F(green) /Warm · {temp}°F(yellow) /⚠️ FAILING · {temp}°F(red). isNaN/unavailable → grey card, label "No reading".- Section header:
custom:mushroom-title-cardtitled "🧊 Food Temperature". - Placement: appended to the bottom of the existing Climate view in
lovelace/home_command_dashboard.json. - (Humidity / battery tiles deferred — can add later.)
2. Automations — new "Food Temperature" section in automations.yaml¶
One consolidated automation per appliance (3 total), each a multi-trigger automation using numeric_state triggers with above: + for: (the for: duration is the debounce — the timer resets the moment temp drops back below the threshold; no helper timers needed). Branch on trigger.id via choose:.
Per-appliance triggers: - id: soft — temp above: <soft> for: <soft_minutes> → standard push, you only - id: hard — temp above: <hard> for: <hard_minutes> → critical push (data.push.interruption-level: critical, bypasses DND), both phones - id: health_offline — temp sensor to: 'unavailable' for: minutes: 30 → standard push, you only - id: health_battery — sensor.*_battery below: 15 → standard push, you only - id: recover — temp below: <green_ceiling> for: minutes: 15 → all-clear push, only if the appliance's alert boolean is on; then turn the boolean off
Each tier's action sets/clears input_boolean.food_alert_<appliance> so the all-clear fires only after a real alert, and repeat alerts don't spam (an automation condition on the boolean state gates re-firing within an active episode).
Notification copy names the appliance and current temp, e.g. ⚠️ Refrigerator FAILING — 58°F, food at risk / Refrigerator warm — 48°F for 45 min, check the door / 🔋 Refrigerator sensor offline — can't monitor temp / ✅ Refrigerator back to normal — 38°F.
3. Helpers — configuration.yaml¶
Three input_booleans tracking active-alert state (for all-clear gating and repeat suppression): - input_boolean.food_alert_refrigerator - input_boolean.food_alert_refrigerator_freezer - input_boolean.food_alert_freezer
4. Recipients¶
| Alert | Recipients | Interruption level |
|---|---|---|
| 🟡 Soft (warm) | notify.mobile_app_louis_iphone | normal |
| 🔋 Health (offline / low battery) | notify.mobile_app_louis_iphone | normal |
| 🔴 Hard (critical) | notify.mobile_app_louis_iphone + notify.mobile_app_lindsays_iphone | critical (bypass DND) |
| ✅ All-clear | same set that received the originating alert | normal |
Testing & Deploy¶
- Entity snapshot: refresh
tests/fixtures/entities.txtto include the three renamed sensor families (temperature + battery at minimum) so Tier-3 entity-reference checks pass. Insert surgically (additions-only diff), as done for the FLF sensors. - Automations deploy via CI hot-reload (
automation.reload, no HA restart). configuration.yaml(newinput_booleans) → CI fullha core restart.- Dashboard (
lovelace/home_command_dashboard.json) → CI deploy-lovelace stop→swap→start (pull fresh first). Pushing config + dashboard together means one restart for config, then the lovelace swap. - Tiers 0–3 (
make test) must pass before deploy (CI gates on it).
Out of Scope (future)¶
- Humidity / battery / Zigbee-signal tiles.
- Temperature history graphs (Grafana / apexcharts sparklines).
- Threshold tuning via
input_numberhelpers (hardcoded with comments for now). - Door-open correlation via a physical contact sensor (none installed).
Open Questions¶
None — design approved 2026-06-08.