You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run code with Mi Scale 1 and it errored out. I believe that line 73 in Xiaomi_Scale.py should be self._publish(round(measured, 2), unit, "", "")
instead of self._publish(round(measured, 2, "", ""), unit)
The text was updated successfully, but these errors were encountered:
Thanks. As per the README I don't have a V1 scale so never gave it much attention, but more than happy to work with you to get it up to the same level as the V2 Scale.
Did you test and confirm your code is working?
Had a quick look and the publish function: def _publish(self, weight, unit, mitdatetime, miimpedance):
Therefore the function call should actually be: self._publish(round(measured, 2), unit, "", "")
I've amended the code to reflect this
Last but not least, is this the only thing that needs fixing to make it work with a V1 scale?
I'm no coder but after i moved the empty strings behind the unit variable the code did work without problems.
Other than that, I didn't have any problems. The code work perfectly with the V1 scale. I'm using your sensor block template for Home Assistant too and everything is working as expected.
I tried to run code with Mi Scale 1 and it errored out. I believe that line 73 in Xiaomi_Scale.py should be
self._publish(round(measured, 2), unit, "", "")
instead of
self._publish(round(measured, 2, "", ""), unit)
The text was updated successfully, but these errors were encountered: