I tried modifying the script per your example, but I wasn’t successful. As I was already starting the fan via command line I gave up.
Yesterday I found an addon to control argon one fan and I am testing it. So far it is working fine. I uninstalled the argonone scripts completely and I’m running just this addon. Here is the link, if you hadn’t seen yet.
I found Argon’ s information on the power button operation:
Power Button Events
Cases that come with a power button can turn the computer on and off while ensuring that the files stored are safe. It works by setting a pulse to BCM 4 (BOARD P7) depending on the action. The software that listens to these events should be able to react accordingly.
Double Tap - 20-30ms pulse
Hold and release after 3 seconds - 40-50ms pulse
Have been tinkering with Python somewhat and created something that seems to work on my system and put it on my gitlab: