Custom Integration: Waveshare UPS for Raspberry Pi

I recently decided to add a Waveshare UPS to my Raspberry Pi that was running Home Assistant. I thought it would be a good to be able to understand when the Pi was being powered by the batteries or by mains. I did a quick look around and couldn’t see much to help with this - at least nothing that was UI configurable. I decided to write another integration to do these tasks.

It can be installed via HACS using by adding the GitHub repository URL as a custom repository.

I’m not electronics engineer so I have no idea really what the figures are all about but I have used the source code provided by Waveshare here.

The entities provided can then be used to determine when to cleanly shutdown the Pi if need be.

Home Assistant 2023.5.0 and newer are currently supported because I have only tested on those versions.


You did a great job congratulations. I hope to try this component with my Raspberry Pi3 b+ soon.

How long can the Raspberry stay on with the Hat UPS batteries?