Pisugar UPS support on Homeassistant OS

Hi all,

I bought one of these https://www.pisugar.com for my rpi4 and connected it up. Now to have the auto shutdown feature and battery health condition monitoring available, I need to install some additional software but seems to be for a standard RPI installation.

How do I do this with HA OS?

I’m running

Home Assistant Core 2022.6.2

Home Assistant Supervisor 2022.05.3

Home Assistant OS 8.1

1 Like

I have a similar question but using a 52pi UPS

Solved ? I have the same problem…

I am interested in this topic.
I wrote to PiSugar to get information about compatibility with Home Assistant but it was not very helpful.

Hi,

Thank you for your interest in PiSugar!
Currently PiSugar cannot support the project you mentioned.
Perhaps the next generation of PiSugar will have a Bluetooth version, which will help.
You can also try to develop and access Home assistant, if you have any good news, please share with us~

Regards,
PiSugar Team

Well that helps a lot :wink: Thanks for asking anyway!

I found this repository, can someone test it?

Hey @Menelao, I am the owner of the repo, but i have I have abandoned this project for now, as I no longer run home assistant on Raspberry Pi currently.

I just installed it on my HA. The latest realese is Alpha 0.7, so the dev knew it wasn’t ready for prime time. Regardless, tried to provision and all seemed good (though it did not prompt for credentials), but then saw this in the logs…

Logger: homeassistant.setup
Source: setup.py:422
First occurred: 6:00:00 PM (1 occurrences)
Last logged: 6:00:00 PM

Error during setup of component pisugar: ‘pisugar’
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 422, in _async_setup_component
result = await task
^^^^^^^^^^
File “/config/custom_components/pisugar/init.py”, line 29, in async_setup
hass.data[DOMAIN] = config[DOMAIN]
~~~~~~^^^^^^^^
KeyError: ‘pisugar’

then

Logger: homeassistant.helpers.typing
Source: helpers/deprecation.py:222
First occurred: 6:00:00 PM (1 occurrences)
Last logged: 6:00:00 PM

HomeAssistantType was used from pisugar, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the ‘pisugar’ custom integration

So it will take some dev work to fix.

I’ve not developed for HA so no clue of the real effort here. I will investigate more when I have time.

-Chris