odya / hass-ina219-ups-hat

Home Assistant UPS Hat integration. Waveshare and others based on INA219
MIT License
7 stars 2 forks source link

UPS HAT (D) Binary sensors #8

Closed kamilnuriev closed 4 days ago

kamilnuriev commented 3 months ago

I use HassOS. Today I connected UPS HAT D for the first time. image

In the coordinator.py file I wrote "self._ina219 = INA219(addr=0x43)" In the ina219.py file I wrote "def init(self, i2c_bus=1, addr=0x43)"

If you do not specify "battery_capacity" in configuration.yaml, the integration will not start.

The parameters of the binary sensors "UPS Charging" and "UPS Online" show opposite values, what needs to be done to change them to the correct ones? image

odya commented 4 days ago

Fixed battery_capacity bug in #14

odya commented 4 days ago

The min_online_current and min_charging_current parameters have been moved to the config file. You can change the thresholds yourself. I believe I have fixed the bug by setting appropriate default values for these parameters.