I wanted to share a fun and innovative solution I came up with for detecting bed occupancy using the Aqara Vibration Sensor. I know many of you have been looking for reliable bed sensors, and this might just be the hack you’re looking for!
Here’s how it works:
-
Setup: I attached the Aqara Vibration Sensor to one end of a ruler and placed it under the mattress on the opposite end. The idea is that when someone lies down, the weight causes the bed to tilt slightly, which changes the sensor’s tilt angle.
-
Configuration: Using Zigbee2MQTT, the sensor automatically creates separate tilt_X/Y/Z sensors. This makes it easy to monitor the tilt changes without any additional setup.
-
Automation: I created a simple template sensor in Home Assistant to detect when the tilt angle exceeds a certain threshold. Here’s the configuration:
binary_sensor:
- platform: template
sensors:
bed_occupied:
value_template: “{{ states(‘sensor.vibration_sensor_angle_y’)|float > 30 }}”
friendly_name: ‘Bed is occupied’
This setup has been incredibly reliable for me. The sensor reacts almost instantly, and I haven’t had any false positives from my cat jumping on the bed. Plus, it’s a great way to repurpose an otherwise underutilized sensor!
I’d love to hear if anyone else has tried something similar or has other creative uses for the Aqara Vibration Sensor. Let’s keep the brainstorming going! ![]()