Help needed with an automation to sense sonoff smart socket as offline

I’m trying to make a simple UPS for my hassio setup. The idea is to have a powerbank that is plugged into a Tasmota enable sonoff smart socket, with the hassio setup coming off the powerbank. If there is a powercut for greater than 5 minutes, I would like to detect the smart socket as being offline and then set a 1 hour delay before shutting down hassio. The idea being that the powerback can power the whole setup for that period before safely shutting down.

I think I can probably work out how to do some of this in automations, but I don’t know how to detect the smart socket going offline, any ideas?

Is detecting something as being offline not possible in HA?

I’m not at all familiar with Tasmota ( I use ESPhome ) but I’d be surprised if something wasn’t already built in to the TasmoAdmin add-on.

Failing that you’ll be able to setup a ping binary sensor and an automation to fire if it ever turns off

1 Like