To begin with a confession - I know nothing of programming. But if pointed in the right direction, can copy & paste like its going out of style.
I used to use a Mimolite as a momentary switch to control my garage door. I had it disconnected from the GDO yesterday, and in a flash my cat Diesel ran off with it and dropped it in his water bowl. It's drying out in some rice, but I'm not hopeful.
So I pulled out a relay with a 120V coil, and decided to re-purpose a Securifi Peanut plug as a momentary switch to power the relay. There is a driver for this plug on GitHub that I modified to include momentary capability (Push) using Groovy examples I found.
It works well enough and I used it as a momentary switch in RM.
However, I also want to be able to make the physical button on the Peanut plug act like a momentary switch. I can do that using Rule Machine. Is there anyway to do that by modifying the device driver?