From 74cac15c8438d0369c8766b6c4e05df9931e850b Mon Sep 17 00:00:00 2001 From: bonesmurones Date: Thu, 19 Nov 2015 11:04:26 -0500 Subject: [PATCH] Mod for dimming some lights at fractional levels Allows some dimmers to be set at 1/4, 1/3, or 1/2 the master value. There must be at least one light at full dimmer level. Useful if you have that one light that is out of place at full brightness --- dim-with-me.app.groovy | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dim-with-me.app.groovy b/dim-with-me.app.groovy index 5d254ee..b5514f6 100644 --- a/dim-with-me.app.groovy +++ b/dim-with-me.app.groovy @@ -43,7 +43,7 @@ // Automatically generated. Make future change here. definition( - name: "Dim With Me", + name: "Dim Proportional to Me", namespace: "wackware", author: "todd@wackford.net", description: "Follows the dimmer level of another dimmer", @@ -73,6 +73,24 @@ preferences { title: "Slave Dimmer Switch(es)...", required: true } + section("And these will follow with 1/4 dimming level...") { + input "slavesquarter", "capability.switchLevel", + multiple: true, + title: "Slave 1/4 Dimmer Switch(es)...", + required: false + } + section("And these will follow with 1/3 dimming level...") { + input "slavesthird", "capability.switchLevel", + multiple: true, + title: "Slave 1/3 Dimmer Switch(es)...", + required: false + } + section("And these will follow with 1/2 dimming level...") { + input "slaveshalf", "capability.switchLevel", + multiple: true, + title: "Slave 1/2 Dimmer Switch(es)...", + required: false + } } def installed() @@ -102,6 +120,9 @@ def switchSetLevelHandler(evt) level = level.toInteger() log.info "switchSetLevelHandler Event: ${level}" slaves?.setLevel(level) + slavesquarter?.setLevel(level/4) + slavesthird?.setLevel(level/3) + slaveshalf?.setLevel(level/2) } def switchOffHandler(evt) {