Automation to Power a Device off then Back on later?

When I experience a power outage I have a refrigerator that goes into somewhat of a Compressor click loop of death. The way to resolve this is to power the refrigerator off for 30 minutes and then power it back on. I am trying to automate this so that when my refrigerator detects that the wattage has unexpectedly dropped to zero, it needs to then make sure it turns itself off, waits 30 minutes, and then turns itself back on. I have both wattage use and on/off on the unit via a zigbee plug.

I’m trying to accomplish this in the new ST app. Trying to give it as good of a chance as I can so I uninstalled classic. I realize there may be ways to do this with additional services however hoping there’s a way to do this with an automation or something I haven’t thought of yet.

Create Automation.
If device is off,
Than turn device On - delay 30 minutes

Thanks for the reply. It’s a good thought but by the time the automation detects the device is off the power is already back on and it’s powering up. I almost need it to stay off for that to work but when I get a 5 second brownout the fridge is back on before the automation can even act.

If I could find a way for the automation to keep it off, or for the zigbee wall plug to default to off of power goes out and not last state though, this would work. I wonder if that’s possible.