Change Shelly button type if HA unreachable

Is there any way to automatically change the button type of a Shelly switch from ‘detached’ to ‘edge’ if it looses contact with HA? I know they have a LWT topic but I’m not sure if that can be used to trigger this.

More details: I’m using Shelly 1/2s for my LIFX lights which are hard wired to power. I am only using the Shelly’s to sense switch events via mqtt and feeding that to an automation to toggle that group of lights. It works pretty good but inevitably something will go wrong with HA and break them. At that point you are left with lights stuck in whatever position and the switches are dead. Rather than hard wiring the bulbs as they are now, I want to hook them up to the Shelly relay in detached mode and just have the relay always on unless it looses contact with HA then it will fail back to edge switch mode. Any ideas?

No ideas huh? I guess I could use two shellies per circuit and use them to babysit each other. Seems kind of wasteful though. I wonder if flashing tazmota would open up any options?