Open AndyBerman opened 2 years ago
for anyone else with this issue, changing the last part of cover.py to look like
@property
def current_cover_position(self):
"""Return the current position of cover shutter."""
return 100 - self._device.get_battery_percent()
#return self._device.get_position()
def update(self):
self._device.update()
self._light = self._device.get_light_level()
self._battery = self._device.get_position()
#self._battery = self._device.get_battery_percent()
seems to work okay
That fixed the problem, thanks!
I just updated the firmware on my switchbot curtains (foolishly), and now the current_position and battery attributes are incorrect. They appear to be swapped.