When writing plugin code, I'm always dealing with Indigo device objects, those things that get created by users and referenced from all the plugin methods.
In most of my plugins, I'm also creating custom Python classes and objects, and usually have a one-to-one correspondence between Indigo devices and my custom device objects.
And then I get confused about which is which at various places in the code and get lots of errors like:
- Code: Select all
AttributeError: 'Device' object has no attribute 'authenticated'
Sigh.
Maybe I need to adopt a specific naming scheme to keep the two separate...
And don't even get me started on the different places where the Indigo device ID is integer vs string.