From df17562d1684eee61f65acd50e37eed004911f99 Mon Sep 17 00:00:00 2001 From: ZWozniakS Date: Mon, 28 Oct 2019 12:01:15 +0100 Subject: [PATCH] Added on command to the setColorTemp() --- .../aeon-multiwhite-bulb.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/aeon-multiwhite-bulb.src/aeon-multiwhite-bulb.groovy b/devicetypes/smartthings/aeon-multiwhite-bulb.src/aeon-multiwhite-bulb.groovy index 81d8f6c854c..aed61031d40 100644 --- a/devicetypes/smartthings/aeon-multiwhite-bulb.src/aeon-multiwhite-bulb.groovy +++ b/devicetypes/smartthings/aeon-multiwhite-bulb.src/aeon-multiwhite-bulb.groovy @@ -192,9 +192,14 @@ def setColorTemperature(temp) { def warmValue = temp < 5000 ? 255 : 0 def coldValue = temp >= 5000 ? 255 : 0 def parameterNumber = temp < 5000 ? WARM_WHITE_CONFIG : COLD_WHITE_CONFIG - def cmds = [zwave.configurationV1.configurationSet([parameterNumber: parameterNumber, size: 2, scaledConfigurationValue: temp]), - zwave.switchColorV3.switchColorSet(warmWhite: warmValue, coldWhite: coldValue)] - commands(cmds) + "delay 7000" + commands(queryAllColors(), 500) + def results = [] + results << zwave.configurationV1.configurationSet([parameterNumber: parameterNumber, size: 2, scaledConfigurationValue: temp]) + results << zwave.switchColorV3.switchColorSet(warmWhite: warmValue, coldWhite: coldValue) + if (device.currentValue("switch") != "on") { + results << zwave.basicV1.basicSet(value: 0xFF) + results << zwave.switchMultilevelV3.switchMultilevelGet() + } + commands(results) + "delay 7000" + commands(queryAllColors(), 500) } private queryAllColors() {