Allonis sells a Uniteruptible Power Supply (UPS) that is integrated into the myServer 6 Raspberry PI controllers (Pi4 and 5)
With that, if the power is disconnected, the UPS will continue keeping the Raspberry Pi up and running until myServer's automation rules gracefully shuts it down.
By default, the UPS is configured to auto boot when power is applied (after a 3 second delay to help ensure power line stability).
Also by default, the UPS is configured to charge it's backup batteries when power line is available.
The myServer driver will track the UPS's backup battery state of charge. You will notice that the voltage will normally vary from 90% to 101% as it charges itself as the need exists.
You can configure the Automation Rule of when myServer will shut itself down gracefully. You can also optionally add rules that provide indication that the power is down (or back up again). This could be a Toast message that all clients see, or a blinking light, or an audio clip that gets played (depends on how you want to be notified, and by what means you like and by what hardware you have available that is accessible via myServer).