From 043dd5ce0fde2f6c02a68178d426804c5cfd8de9 Mon Sep 17 00:00:00 2001 From: Rob Fair Date: Tue, 4 Jan 2022 14:14:16 -0500 Subject: [PATCH 1/3] Address inconsistency in 99 vs 100 for position. --- iblindsV3_10.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iblindsV3_10.groovy b/iblindsV3_10.groovy index 6f08294..7c49d78 100644 --- a/iblindsV3_10.groovy +++ b/iblindsV3_10.groovy @@ -114,7 +114,7 @@ private dimmerEvents(hubitat.zwave.Command cmd) { Integer position = cmd.value as Integer String switchValue = "off" String windowShadeState = "closed" - if (position > 0 && position < 100) { + if (position > 0 && position < 99) { switchValue = "on" windowShadeState = "open" } From 4f37af47cdedf642837bc758a3941a0920abdc8e Mon Sep 17 00:00:00 2001 From: Rob Fair Date: Tue, 4 Jan 2022 14:14:16 -0500 Subject: [PATCH 2/3] Address inconsistency in 99 vs 100 for position. --- iblindsV3_10.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/iblindsV3_10.groovy b/iblindsV3_10.groovy index 7c49d78..63e7222 100644 --- a/iblindsV3_10.groovy +++ b/iblindsV3_10.groovy @@ -17,6 +17,7 @@ * Update Gassgs, Gary G, 10-06-21 - Start Position Change Open/Close commands, Fixed Position Attribute, Fixed update when button pushed * Update Gassgs, Gary G, 10-11-21 - Added stop command while blind is moving over a duration * Update Gassgs, Gary G, 11-22-21 - Fixed Battery level attribute update + * Update Rob F, 1-5-22 - Fixed dimmer handler 99/100 limit * */ metadata { From 47d827b49f958acbc57ab878a7f3beb703cd9529 Mon Sep 17 00:00:00 2001 From: Rob Fair Date: Wed, 5 Jan 2022 15:51:59 -0500 Subject: [PATCH 3/3] Add check on level after set. --- iblindsV3_10.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iblindsV3_10.groovy b/iblindsV3_10.groovy index 63e7222..d6a5fb8 100644 --- a/iblindsV3_10.groovy +++ b/iblindsV3_10.groovy @@ -18,6 +18,7 @@ * Update Gassgs, Gary G, 10-11-21 - Added stop command while blind is moving over a duration * Update Gassgs, Gary G, 11-22-21 - Fixed Battery level attribute update * Update Rob F, 1-5-22 - Fixed dimmer handler 99/100 limit + * Update Rob F, 1-5-22 - Get level after set to validate change * */ metadata { @@ -190,7 +191,11 @@ def setLevel(value, duration=0) { } def setLevel = reverse ? 99 - level : level def dimmingDuration = duration < 128 ? duration : 128 + Math.round(duration / 60) - zwave.switchMultilevelV2.switchMultilevelSet(value: setLevel, dimmingDuration: dimmingDuration).format() + def delayDuration = ((dimmingDuration + 2 )* 1000) + delayBetween([ + zwave.switchMultilevelV2.switchMultilevelSet(value: setLevel, dimmingDuration: dimmingDuration).format(), + zwave.switchMultilevelV1.switchMultilevelGet().format(), + ], delayDuration) } def endDuration(){