Thank you for the tip. I went to the "driver code" section, clicked on the Tuya Scene Switch TS004F and edited the Debounnce Time from 1000 to 2000, then clicked on save and exited the section. I tried the button and once again it continues to randomly register double clicks. I tried clicking several times afterwards, and the copied the debug logs for the previous clicks and pasted them below. Hopefully these show the error:
dev:2032023-03-25 03:10:32.943 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:10:30.915 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:10:30.912 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:10:30.910 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:10:17.081 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:10:15.058 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:10:15.056 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:10:15.054 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:10:07.348 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:10:05.328 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:10:05.326 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:10:05.324 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:10:03.877 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:10:01.851 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:10:01.849 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:10:01.847 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:09:59.004 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:09:56.977 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:09:56.975 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:09:56.973 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:09:54.932 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:09:53.395 PMinfobookcase button battery is 100 %
dev:2032023-03-25 03:09:53.386 PMdebugbookcase button Event enter: [name:battery, value:100.0]
dev:2032023-03-25 03:09:53.381 PMdebugbookcase button description is read attr - raw: FE1001000110210020C82000201E, dni: FE10, endpoint: 01, cluster: 0001, size: 10, attrId: 0021, encoding: 20, command: 0A, value: C82000201E
dev:2032023-03-25 03:09:52.906 PMinfobookcase button button 1 was pushed
dev:2032023-03-25 03:09:52.903 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
dev:2032023-03-25 03:09:52.902 PMdebugbookcase button description is catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00
dev:2032023-03-25 03:09:50.456 PMdebugbookcase button debouncing timer for button 1 expired.
dev:2032023-03-25 03:09:48.467 PMdebugbookcase button restarted debouncing timer 2000ms for button 1 (lastButtonNumber=1)
dev:2032023-03-25 03:09:48.401 PMwarnbookcase button ignored event for button 1 - still in the debouncing time period!
dev:2032023-03-25 03:09:48.397 PMdebugbookcase button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 FE10 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:FE10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]
Thanks.
Edit: I just tried setting the debouncing time to an even longer period (9000 ms) and naturally the button pressings are not registered until after the debounce period ends but once it does it goes right back to registering double clicks...