UPS for Raspi 4 B with openhabian

A UPS is a good idea–personally, I’d say it’s more of a requirement than a recommendation.

If you want to stick a hat and a battery on your RPi, then you should look for a tutorial that can tell you how to wire it up and send shutdown commands to your RPi. This wouldn’t be the place for that tutorial, since there’s no need for openHAB in that equation–it’s strictly an RPi task. However, people here have definitely done that, and may be able to point you in the right direction.

Personally, I wouldn’t bother with a hat unless your RPi is in a very confined space. You just need a simple plug-in UPS that is compatible with Network UPS Tools. Then you can just plug in the RPi’s native AC adapter and don’t have to worry about amperage.