Implement sensor status debouncing

This introduces a configurable debouncing delay before which no update
is sent to matrix, which avoids flooding the matrix room with updates
when the door is opened and closed in quick succession. It also allows
to quickly open and close the door without sending notifications.

The debouncing window can be configured in config.yml, see example.
This commit is contained in:
mirsal committed 2026-10-07 20:17:49 +00:00
1 parent 233a0944c7
commit 38f849e323
3 files changed
+74 -15

No files matched your search

+2
View File
@@ -9,6 +9,8 @@ mqtt:
rooms:
- "!iFCnqQcvrVIeehrjQO:chat.labolyon.fr"
debounce_delay: 10 # seconds
# username / password login
# /!\ will create a new device every time the bot starts
username: "login"