Shelly 1 PM mini Gen3 unstable MQTT

This is my 9th relay added to my setup. The first 8 are a mix of Shelly 1 and 1L. I didn’t have great results with the Shelly HA integration. It’s timing was terrible. The 8 are all tied together to turn lights on at the same time. With the integration there could be a delay of upwards of 3 seconds between the first one turning on and the last one. That being said, I switched them all to MQTT and the timing got down to within one second.

Now I added the 1 PM mini Gen3. Firmware version 1.2.2. First I tried the Shelly HA integration. It was unstable. The light is part of a timed setup, turns on a 8am and turns off at 8pm. It would not always trigger. Also turning it on and off from within HA was dubious at best. Often an error would be received.

Next I figured, just switch it to MQTT like I have the others. First, configuring the new relay is confusing at best. I think I have it right but let me know if I messed something up. Next getting it to actually registered in the MQTT devices was another nightmare. The shelly discovery gen2 script from HACS is not as easy to use as the original. What I finally found is that I have to add the Shelly MQTT prefix into the automation and run it. The relay registered as a device. Hooray.

But that is still not the end of my problems. Even with MQTT the relay is unstable. It keeps dropping out and going to became unavailable.

I’m assuming that if the turn on or turn off event triggers while the relay is unavailable it won’t function. Similar to the HA integration, the relay will sometimes not trigger.

Is there a setting or configuration that I missed?