From e787afd165f91028ab8a12351d53d4d11f5ef59b Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Thu, 23 Feb 2017 11:31:49 -0800 Subject: [PATCH] updated with more devices --- .../smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy index 54bf8dd..8fe39fc 100644 --- a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy @@ -114,8 +114,10 @@ def refresh() { } def installed() { - if ((device.getDataValue("manufacturer") == "MRVL") && (device.getDataValue("model") == "MZ100")) { - sendEvent(name: "level", value: 100) + if (((device.getDataValue("manufacturer") == "MRVL") && (device.getDataValue("model") == "MZ100")) || (device.getDataValue("manufacturer") == "OSRAM SYLVANIA") || (device.getDataValue("manufacturer") == "OSRAM")) { + if ((device.currentState("level")?.value == null) || (device.currentState("level")?.value == 0)) { + sendEvent(name: "level", value: 100) + } } }