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
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