It's not rocket science:
- Get a battery backup system for your Hubitat
- Install Hubitat Hub Controller via Package Manager
- Install iPhone WiFi Presence Sensor via Package Manager
- create a new virtual device and change the driver to iPhone WiFi Presence Sensor
- Point your "WiFi Presence Sensor" device at a suitable IP device that will respond to HTTP commands and isn't on battery backup.
- Setup your WiFi Presence Sensor with an appropriate "Timeout Minutes" so Hubitat knows it's actually offline. eg I use 10 minutes because I don't want reboots and updates to trick WiFi Presence Sensor into thinking it's offline.
- Setup a Rule Machine rule as I showed earlier to glue it all together. I use a 6 hour timer because my backup unit can run my C7 for about 7 Hours.