I have a python script that looks through all devices:
- Code: Select all
for dev in indigo.devices:
then I can do things based on class, for example:
- Code: Select all
if (dev.__class__ == indigo.DimmerDevice):
I want to be able to know if a device is a z-wave door lock. A door lock is a indigo.RelayDevice class along with a bunch of other switches. I tried looking for the key 'IsLockSubType' in pluginProps per the indigo 7 docs, but it is not there. My z-wave door lock shows up correctly in the Indigo 7 UI with the lock/unlock instead of on/off elements. So, I was expecting to find this key in the pluginProps for my door lock devices.
So, how do I detect that a device is a door lock in python?
Thanks,
Darren