|
20 | 20 | */
|
21 | 21 | def version() { return "v0.3.162.20161028" }
|
22 | 22 | /*
|
| 23 | + * 11/02/2016 >>> v0.3.163.20161102 - RC - Adjustments to better fit the Ring integration - assuming 1 button if no numberOfButtons (may break other DTH implementations), assuming button #1 pushed if no buttonNumber is provided |
23 | 24 | * 10/28/2016 >>> v0.3.162.20161028 - RC - Minor speed improvement for getNextConditionId()
|
24 | 25 | * 10/27/2016 >>> v0.3.161.20161027 - RC - Fixed a bug affecting the queueAskAlexaMessage virtual command task
|
25 | 26 | * 10/14/2016 >>> v0.3.160.20161014 - RC - Fixed a bug not allowing Set color to work when using HSL instead of a simple color. Compliments to @simonselmer
|
@@ -4607,8 +4608,11 @@ private evaluateDeviceCondition(condition, evt) {
|
4607 | 4608 | if (evt && capability && capability.count && capability.data) {
|
4608 | 4609 | //at this point we won't evaluate this condition unless we have the right sub device below
|
4609 | 4610 | hasSubDevices = true
|
4610 |
| - setVariable("\$currentEventDeviceIndex", cast(evt.jsonData ? evt.jsonData[capability.data] : 0, "number"), true) |
4611 |
| - def subDeviceId = "#${evt.jsonData ? evt.jsonData[capability.data] : "0"}".trim() |
| 4611 | + def idx = cast(evt.jsonData ? evt.jsonData[capability.data] : 0, "number") |
| 4612 | + //if button index is 0, make it 1 |
| 4613 | + if ((attr.name == "button") && (idx == 0)) idx = 1 |
| 4614 | + setVariable("\$currentEventDeviceIndex", idx, true) |
| 4615 | + def subDeviceId = "#$idx".trim() |
4612 | 4616 | def subDevices = condition.sdev ?: []
|
4613 | 4617 | if (subDeviceId == "#0") subDeviceId = "(none)"
|
4614 | 4618 | if (subDevices && subDevices.size()) {
|
@@ -10046,7 +10050,7 @@ private listCommonDeviceSubDevices(devices, countAttributes, prefix = "") {
|
10046 | 10050 | countAttributes = []
|
10047 | 10051 | }
|
10048 | 10052 | for (device in devices) {
|
10049 |
| - def cnt = device.name.toLowerCase().contains("lock") ? 32 : 4 |
| 10053 | + def cnt = device.name.toLowerCase().contains("lock") ? 32 : 1 |
10050 | 10054 | switch (device.name) {
|
10051 | 10055 | case "Aeon Minimote":
|
10052 | 10056 | case "Aeon Key Fob":
|
|
0 commit comments