mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-19 13:20:53 +00:00
Compare commits
5 Commits
PROD_2016.
...
MSA-1596-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91c35fb85b | ||
|
|
ac386e22c0 | ||
|
|
7b32892dc7 | ||
|
|
8ac2c8fda2 | ||
|
|
7f4e46f9a7 |
@@ -120,15 +120,6 @@ def configure() {
|
|||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def installed() {
|
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def initialize() {
|
|
||||||
sendEvent(name: "numberOfButtons", value: 4)
|
sendEvent(name: "numberOfButtons", value: 4)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,15 +109,6 @@ def configure() {
|
|||||||
return cmds
|
return cmds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def installed() {
|
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def initialize() {
|
|
||||||
sendEvent(name: "numberOfButtons", value: 4)
|
sendEvent(name: "numberOfButtons", value: 4)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,15 +183,6 @@ def updateState(String name, String value) {
|
|||||||
device.updateDataValue(name, value)
|
device.updateDataValue(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def installed() {
|
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def initialize() {
|
|
||||||
sendEvent(name: "numberOfButtons", value: 3)
|
sendEvent(name: "numberOfButtons", value: 3)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ def parse(String description) {
|
|||||||
|
|
||||||
private Map parseBasicMessage(description) {
|
private Map parseBasicMessage(description) {
|
||||||
def name = parseName(description)
|
def name = parseName(description)
|
||||||
def results = [:]
|
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
def value = parseValue(description)
|
def value = parseValue(description)
|
||||||
def linkText = getLinkText(device)
|
def linkText = getLinkText(device)
|
||||||
@@ -65,7 +64,7 @@ private Map parseBasicMessage(description) {
|
|||||||
def handlerName = value
|
def handlerName = value
|
||||||
def isStateChange = isStateChange(device, name, value)
|
def isStateChange = isStateChange(device, name, value)
|
||||||
|
|
||||||
results = [
|
def results = [
|
||||||
name : name,
|
name : name,
|
||||||
value : value,
|
value : value,
|
||||||
linkText : linkText,
|
linkText : linkText,
|
||||||
@@ -74,6 +73,8 @@ private Map parseBasicMessage(description) {
|
|||||||
isStateChange : isStateChange,
|
isStateChange : isStateChange,
|
||||||
displayed : displayed(description, isStateChange)
|
displayed : displayed(description, isStateChange)
|
||||||
]
|
]
|
||||||
|
} else {
|
||||||
|
results = [:]
|
||||||
}
|
}
|
||||||
log.debug "Parse returned $results.descriptionText"
|
log.debug "Parse returned $results.descriptionText"
|
||||||
return results
|
return results
|
||||||
|
|||||||
@@ -126,15 +126,6 @@ private hold(button) {
|
|||||||
sendEvent(name: "button", value: "held", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was held", isStateChange: true)
|
sendEvent(name: "button", value: "held", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was held", isStateChange: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def installed() {
|
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
def initialize() {
|
|
||||||
sendEvent(name: "numberOfButtons", value: 4)
|
sendEvent(name: "numberOfButtons", value: 4)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Ventilation Guru
|
||||||
|
*
|
||||||
|
* Copyright 2016 Tom Lawson
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License. You may obtain a copy of the License at:
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||||
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing permissions and limitations under the License.
|
||||||
|
*
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
definition(
|
||||||
|
name: "Ventilation Guru",
|
||||||
|
namespace: "LawsonAutomation",
|
||||||
|
author: "Tom Lawson",
|
||||||
|
description: "This was a mistaken publication.",
|
||||||
|
category: "Green Living",
|
||||||
|
iconUrl: "https://raw.githubusercontent.com/lawsonautomation/icons/master/guru-60.png",
|
||||||
|
iconX2Url: "https://raw.githubusercontent.com/lawsonautomation/icons/master/guru-120.png",
|
||||||
|
iconX3Url: "https://raw.githubusercontent.com/lawsonautomation/icons/master/guru-120.png")
|
||||||
|
|
||||||
|
preferences {
|
||||||
|
page(name: "mainPage")
|
||||||
|
}
|
||||||
|
|
||||||
|
def mainPage() {
|
||||||
|
state.debugMode = false
|
||||||
|
|
||||||
|
dynamicPage(name: "mainPage", install: true, uninstall: true) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def installed() {
|
||||||
|
LOG "Installed with settings: ${settings}"
|
||||||
|
initialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
def updated() {
|
||||||
|
LOG "Updated with settings: ${settings}"
|
||||||
|
unschedule()
|
||||||
|
unsubscribe()
|
||||||
|
initialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
// initiallization methods
|
||||||
|
|
||||||
|
def initialize() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def LOG(String text) {
|
||||||
|
if (state.debugMode) {
|
||||||
|
log.debug(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user