Possible to do opposite of virtual momentary switch?

I have a tower fan plugged in to an aeon labs outlet plug type doodad. This fan uses an electronic on/off toggle button and doesn’t stay in the on state when switched or loses power.

I’d like to have a virtual switch for it that will toggle it back on after toggling it off. Guessing I could just do this with Rule Machine…?

Anyone have a diff suggestions?

I wrote this a while back, sounds like what you are looking for. It’s a normally on momentary switch. I use it as a master switch to turn off whichever Harmony activity is active.

The other switch in that repository (despite being misnamed), is a double throw momentary. It will remain in a neutral state and you can turn it on or off at any time, but the GUI portion does not work correctly. I never messed with fixing it because I only use it with Echo and it works fine that way.