Actually, that doesn't work. We'll look at getting that information into the device object at some point in the future. In the meantime, you can send the following raw INSTEON command to KPL's to check to see if it's in 8 button mode (if not, it's 6):
- Code: Select all
>>> kpl8 = indigo.devices[1954833500] # "8 Button KPL"
>>> reply = indigo.insteon.sendRaw(kpl8.address, [0x1F, 0x00], waitUntilAck=True)
>>> is8button = bool(reply.ackValue >> 0x03 & 1)
>>> is8button
True
>>> kpl6 = indigo.devices[661601660] # "6 Button KPL"
>>> reply = indigo.insteon.sendRaw(kpl6.address, [0x1F, 0x00], waitUntilAck=True)
>>> is8button = bool(reply.ackValue >> 0x03 & 1)
>>> is8button
False
I think this should work for most KPLs except perhaps for very old ones (which didn't support getting or setting the number of buttons via the API).