mykhailog / hacs_waveshare_ups_hat

Waveshare UPS Hat integration for Home Assistant.
MIT License
19 stars 9 forks source link

Moved to smbus2 #6

Closed mayankraichura closed 2 years ago

mayankraichura commented 2 years ago

History

On July 7, 2022, HA Core update 2022.7.1 was introduced that was based on Python 3.10. However,it seems that smbus-cffi, the library that is being used by the current integration to communicate with INA219 over I2C, does not support Python 3.10 since the last update for the library was in April 2017. Due to this, the current integration was broken in HA leading to sensors being unavailable to the users.

Resolution

The most logical solution was to use smbus2 library that is said to be a drop-in replacement for smbus-cffi with minor changes.

PR

This PR is based on changes by @icaruseffect on his fork that seems to work so all credits to him. Making this PR so that when accepted, those who are already using your custom integration would get an update on on their HACS and repair their broken integration.

mayankraichura commented 2 years ago

Given that it is already working on 2022.7.2, this PR has no use. Closing now.