upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
Apache License 2.0
184 stars 38 forks source link

Index callbacks to avoid linear searchs #67

Closed bdraco closed 4 years ago

bdraco commented 4 years ago

Devices are now indexed in a dict so each callback does not have to search the list of devices and can lookup the integration id in the dict which avoids the linear search of all the devices.

Also de-duplicates a bit of code and prepares for python 3.10

Based on https://github.com/upsert/lutron-caseta-pro/pull/66

bdraco commented 4 years ago

Please deconflict the code now that #66 is merged.

Fixed conflict, ran though isort, ran though black.

Retested to make sure pico remotes still work. 👍

bdraco commented 4 years ago

Thanks 👍