benleb / sureha

SureHA 🐾 monitor & control your Sure Petcare devices via Home Assistant
Apache License 2.0
21 stars 12 forks source link

Default battery voltages if none stored in config. #21

Closed RogerSelwyn closed 3 years ago

RogerSelwyn commented 3 years ago

Default the values, otherwise 'None' gets passed to the calculation later on and the battery % is returned as unknown.

I also note that in surepy the voltages are 1.6 and 1.2, whilst in sureha the voltages are 1.6 and 1.25. Not sure if that is intentional.

benleb commented 3 years ago

Hey, thanks! I just pushed a solution for this issue but I think I like yours more 😂 I will have another look tomorrow, too tired now 🥱