EverythingSmartHome / everything-presence-lite

Everything Presence Lite
145 stars 53 forks source link

Bug: Remove fencing for sensors with filters #206

Closed MenesesPT closed 1 month ago

MenesesPT commented 1 month ago

For the sensors with filters to function correctly they can't be fenced. (fixes #205)

What was happening:

  1. All targets stop being detected - the occupancy is set to false, but it still waits for the delayed_off filter, so it remains occupied.
  2. At least a target is detected - the occupancy is not set to true because of the fencing (as it is still set to occupied).
  3. Since ESPHome didn't receive an occupied state, after the delayed off time has passed, the occupancy is cleared.
  4. Immediately after that, the code checks that the occupied state is false but targets are detected so sets it to true.

The same was happening with occupancy in individual zones.

EverythingSmartHome commented 1 month ago

Thanks!