50ButtonsEach / fliclib-linux-hci

Flic SDK for Linux
307 stars 53 forks source link

EvtBatteryStatus missing in aioflic.py #81

Open dleffo opened 6 years ago

dleffo commented 6 years ago

I added this to the end of _dispatch_event from fliclib.py and added entry for bd_addr. It seemed to do the trick:

if event_name == "EvtBatteryStatus":
         listener = self._battery_status_listeners.get(items["listener_id"])
         if listener is not None:
                bd_addr = listener._bd_addr
                listener.on_battery_status(listener, bd_addr, items["battery_percentage"], items["timestamp"])