When bed-based automations work smoothly, they feel invisible. You slide into bed, your occupancy sensor registers your presence, the blinds close, the thermostat dials back, and the lights turn off.
However, few smart home failures are more frustrating than lying in bed while Home Assistant reports binary_sensor.bed_occupied as “Clear” or “Off”—leaving your lights on and your bedtime routines stalled.
When your smart bed shows as empty while you are actively lying in it, the root cause is rarely a broken integration. The issue typically comes down to cloud polling latency, ballistocardiography threshold drops during shallow breathing, or physical positioning outside the sensor’s detection zone.
Quick Answer
The “bed empty” glitch is usually caused by cloud polling delays, ballistocardiography signal loss during shallow breathing, or shifting off the sensor bladder. Fix it by converting cloud integrations to local webhooks, adjusting the physical position of the sensor pad, and adding a 30-to-60-second delay timer to your Home Assistant automations to bridge temporary drops.
Diagnostic Flowchart: Why the State Shows Empty
Work through these primary failure points to pinpoint why your sensor is dropping offline:
[Bed Reports "Empty" While Occupied]
│
Is entity "Unavailable" or "Off"?
┌────────────┴────────────┐
[Unavailable] [Off]
│ │
API / Network Failure Physical or Logic Dropout
│ │
Check Cloud Tokens & Does it drop after minutes
Local Network Status of stillness / shallow breath?
┌─────────┴─────────┐
[Yes] [No]
│ │
BCG Threshold / Physical Placement
Hysteresis Missing or Weight Mismatch
1. Cloud Polling Latency vs. Webhook Delays
The most common reason Home Assistant fails to see you in bed is simple timing lag.
- The Problem: Many integrations default to cloud polling. Every 60 to 120 seconds, Home Assistant queries the manufacturer’s servers: “Is anyone in bed?” If you get under the covers right after a poll completes, your system may register the room as empty for up to two minutes.
- The Diagnostic: Check the historical logbook for your binary sensor. If the timestamp for occupancy consistently lags behind when you actually got into bed, you are dealing with polling latency.
- The Fix: Move away from basic polling. For Withings users, set up local webhook callbacks as described in Why Your Withings Sensor Thinks the Bed is Empty (When It’s Not).. For Eight Sleep hardware, use local integrations to process presence events on your local network, following Home Assistant Sleep Integration: Troubleshooting the “Entity Unavailable” Error..
2. Low-Heart-Rate Signal Loss (Ballistocardiography Drops)
Pneumatic sleep mats (like the Withings Sleep Analyzer) do not use mechanical micro-switches. They use an air bladder paired with sensitive pressure transducers that register tiny movements from your pulse and breathing.
- The Problem: When you enter deep, restorative sleep stages, your breathing naturally becomes shallow, and your resting heart rate drops. If your physical signals fall below the sensor’s detection threshold, the hardware can assume you got out of bed.
- The Symptom: Your bedtime routine triggers correctly when you first get under the covers, but at 2:00 or 3:00 AM, your occupancy sensor toggles to “Off” for several minutes before turning back “On.”
- The Fix: Do not let raw sensor blips drive your automations directly. Wrap the occupancy sensor in an intermediate Home Assistant Template Sensor that uses a
delay_offcushion:
template:
- binary_sensor:
- name: "Master Bed Filtered Occupancy"
state: >
{{ is_state('binary_sensor.bed_occupied_raw', 'on') }}
device_class: occupancy
delay_off:
minutes: 3
This 3-minute cushion prevents temporary drops in detection from triggering “wake-up” routines in the middle of the night.
3. Physical Placement Issues and the “Middle Gap”
Sensors placed under a mattress must be positioned precisely where your body exerts consistent downward force.
- Thick Mattresses: If you sleep on a dense hybrid mattress or multi-layer memory foam, your body weight is distributed across a broad surface area. This dispersion can weaken the subtle mechanical vibrations reaching a sensor pad beneath the mattress.
- The Center Seam: If you sleep toward the center of a King or Queen bed, you may be resting outside the sensor’s active zone. This is especially common on dual-zone systems, as covered in The Middle Gap Problem: Why Sensors Fail if You Sleep in the Center..
- Slatted Foundations: If an under-mattress sensor pad rests directly over the open gap between bed slats, downward pressure will push the sensor into the empty space rather than compressing it. Place a rigid board or piece of plywood beneath the sensor to create a firm, consistent surface.
4. Resolving Calibration Drift
Sensors that track presence through pressure changes periodically run self-calibration routines to establish a baseline for an “empty” bed.
If you place a heavy weighted blanket, extra pillows, or a mattress topper on the bed while the sensor is calibrating, it may treat that added load as the new zero-point. Later, if you sleep slightly off-center, the sensor may fail to register your body weight above that elevated baseline.
If your sensor frequently gets confused after changing your bedding, walk through the recalibration steps in Calibration Loops: Fixing the “Always Detecting Presence” Sensor Bug..
Diagnostic Checklist: Finding the Fault
Run through these checks to resolve sensor dropouts:
| Diagnostic Step | What to Check | Expected Result | What a Failure Means |
|---|---|---|---|
| 1. Entity Integrity | Home Assistant Developer Tools > States | State reads on or off | If unavailable, check your API tokens and local network connection. |
| 2. Active Load Test | Lie directly over the center of the sensor pad | Toggles to on within 5 seconds | If it remains off, you have a physical placement or baseline calibration issue. |
| 3. Movement Check | Lie completely still for 5 minutes and breathe shallowly | State stays continuously on | If it drops to off, adjust the sensor’s sensitivity or add a delay_off filter. |
| 4. Slats Inspection | Check under the mattress at the sensor location | Sensor sits flat on a rigid, solid base | If the pad is sagging between slats, add support beneath it. |
If your presence sensor is reading correctly but your bedtime routines still fail to run, review The “Goodnight” Script: Diagnosing Automation Fails at Bedtime. to catch logic conflicts in your automation script.
Bottom Line
When Home Assistant assumes your bed is empty while you are in it, the issue is usually caused by cloud delays, sensor placement, or sensitivity thresholds. Convert cloud polling to local webhooks, place a flat, rigid board under the sensor pad, and use a Template Sensor with a delay_off cushion to prevent your smart home from waking you up in the middle of the night.