Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion dim-with-me.app.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down