hbblebc / homebridge-bed-control

Homebridge plugin to control compatible smart beds
Apache License 2.0
7 stars 2 forks source link

Occupancy sensors do not reliably trigger automations #5

Closed traviswparker closed 2 years ago

traviswparker commented 2 years ago

Describe The Bug: The Side or Any occupancy sensors do not seem to be reliably triggering automations. They do update as expected when privacy mode is off, but they do not always trigger automations set to activate when occupancy is detected/no longer detected

To Reproduce: Create an automation using one of the side occupancy sensors and then enter/exit the bed. Wait for sensor to change and see if automation triggers.

Expected behavior: Automation should trigger when occupancy changes to state watched for by automation.

The old homebridge-sleepiq plugin's sensors were reliable. The sensors appear to be the same characteristic type and return the same values as the sensors in the old plugin, and they do reflect changes as soon as the familyStatus data goes back in sync, but do not always trigger automations.

I have modified the code to return false when polling is disabled, that stopped the warnings about HomeKit rejecting the null value, but they're still not reliable. Could this be due to them being nested in the bed accessory?

Environment: