Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#1650 from larsfinander/DVCSMP…
Browse files Browse the repository at this point in the history
…-2395_Update_OPenT2T_staging

DVCSMP-2395 Update OpenT2T with bugfixes
  • Loading branch information
workingmonk authored Feb 6, 2017
2 parents d91c02b + 3905d48 commit 871d75a
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ definition(

//Device Inputs
preferences {
section("Allow <PLACEHOLDER: Your App Name> to control these things...") {
section("Allow OpenT2T to control these things...") {
input "contactSensors", "capability.contactSensor", title: "Which Contact Sensors", multiple: true, required: false
input "garageDoors", "capability.garageDoorControl", title: "Which Garage Doors?", multiple: true, required: false
input "locks", "capability.lock", title: "Which Locks?", multiple: true, required: false
Expand Down Expand Up @@ -329,34 +329,38 @@ private getDeviceType(device) {
switch (it.name.toLowerCase()) {
case "switch":
deviceType = "switch"
break
case "switch level":
deviceType = "light"
if (caps.any { it.name.toLowerCase() == "power meter" }) {
return deviceType
}
if (caps.any { it.name.toLowerCase() == "switch level" }) {
deviceType = "light"
return deviceType
}
break
case "contact sensor":
deviceType = "contactSensor"
break
return deviceType
case "garageDoorControl":
deviceType = "garageDoor"
break
return deviceType
case "lock":
deviceType = "lock"
break
return deviceType
case "video camera":
deviceType = "camera"
break
return deviceType
case "motion sensor":
deviceType = "motionSensor"
break
return deviceType
case "presence sensor":
deviceType = "presenceSensor"
break
return deviceType
case "thermostat":
deviceType = "thermostat"
break
return deviceType
case "water sensor":
deviceType = "waterSensor"
break
return deviceType
default:
break
}
Expand Down

0 comments on commit 871d75a

Please sign in to comment.