Remove false positives
This commit is contained in:
@@ -250,7 +250,7 @@ async def rfid_listener_task():
|
|||||||
tag_id = await asyncio.to_thread(rfid.read_tag)
|
tag_id = await asyncio.to_thread(rfid.read_tag)
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
|
||||||
if tag_id:
|
if tag_id and tag_id != "0000000000":
|
||||||
# Debounce same tag within 3 seconds to avoid spamming the API
|
# Debounce same tag within 3 seconds to avoid spamming the API
|
||||||
if tag_id == last_scanned_tag and (current_time - last_scan_time) < 3.0:
|
if tag_id == last_scanned_tag and (current_time - last_scan_time) < 3.0:
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
|
|||||||
Reference in New Issue
Block a user