Being able to react on time is critical if the power fails. No wonder some battery backup (UPS) is needed, but in many cases it is not enough to just keep the session going, so some actions must be started.
With the Firefly ability to launch scripts upon sensor events, it is really easy.
Just purchase a simple relay, powered at 5V DC. Use a cheap mains adaptor, such as an old mobile phone charger, to power on the relay, but plug it outside the UPS (unprotected!). While there's power, the contact of the relay will remain closed, but if power fails, it will inmediately open.
Now wire the relay, its two switch pins, to any of the Firefly's inputs, and it will detect when the power goes off. As you already now, a script can be launched if one sensor goes off, you can use it to take any appropriate actions.