2026.5.21
Fixed
- Door-closed lock-in no longer fast-clears the room.
_effective_clear_timeouthad inverted semantics — sitting still at a desk with the door closed would clear the room after 30 s. Now extended to a 4 h sanity cap when lock-in is armed.
Changed
- Replaced the brittle "door never opened since OCCUPIED" check with a solid-streak flag (
_has_been_solid). The flag is armed once the room has been continuously above the occupied threshold AND all doors closed forDOOR_LOCK_SOLID_DURATIONseconds (default 120 s). A score dip with doors still closed no longer drops the flag — that is exactly the situation lock-in is meant to bridge. A door-open event or the OCCUPIED → CLEAR transition resets it. - A brief visit by another person (door opens, visitor talks, leaves, door closes) now correctly re-engages lock-in once the streak rebuilds (~2 min after the door closes again), instead of permanently disabling it for the rest of the session.
- When lock-in is armed AND every configured door is currently closed, the no-presence timeout is extended to 4 h (
DEFAULT_DOOR_LOCKED_IN_TIMEOUT) as a sanity cap against a stuck door sensor. - Renamed constant
DEFAULT_DOOR_VALIDATED_TIMEOUT→DEFAULT_DOOR_LOCKED_IN_TIMEOUT. New constantDOOR_LOCK_SOLID_DURATION.
Added
.gitignorecovering__pycache__/.
Full Changelog: 2026.4.28...2026.5.21