Hi everyone
I’m a Home Assistant newb, so any help, guide, or key words to search would be greatly appreciated.
I’ve attached an Aqara window sensor to a car seat sensor to use as a seat occupancy sensor. I’m trying to create an automation so the standing desk will rise if I sit down for more than 1 hour. I’m using Zigbee2MQTT and the sensor works really well. Pleasantly surprised how instant the sensor is.
The problem is when I fidget or move while still sitting down, the sensor will go to a “clear” state for a second and reset the 1 hour timer. This sensor doesn’t have a separate sensitivity expose in zigbee2MQTT.
I’m thinking if I use the last 5 minute average of the occupancy state, then it should provide enough buffer to lessen the sensitivity.
I’ve tried creating a template binary sensor with the following code.
sensor:
- platform: statistics
name: "Seat occupancy 5 min average"
entity_id: binary_sensor.seat_occupancy_sensor_contact
state_characteristic: average_step
max_age:
minutes: 5
I’m not sure if its doing anything, but it doesn’t update at all. I’m assuming the state is never changing. Do I need to force the sensor to start every 5 mins? Is there a way to continuously output the last 5 minute average state?
I’m currently trying to use the last 5 minute average of the state to lessen the sensitivity. I’m sure there are smarter ways to approach this.
Any ideas, help would be great.
Thanks!
1 post - 1 participant