mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-17 13:10:52 +00:00
Compare commits
11 Commits
MSA-1287-1
...
Fake-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
016d36c697 | ||
|
|
fc6b14b85e | ||
|
|
f131fb71cf | ||
|
|
9c27ed6cb7 | ||
|
|
35edaa19c7 | ||
|
|
dc09201866 | ||
|
|
6afcbf8f70 | ||
|
|
bd0ccd0c21 | ||
|
|
566425c531 | ||
|
|
973c16f088 | ||
|
|
b05d956d95 |
@@ -94,11 +94,11 @@ def parse(String description) {
|
|||||||
def cmd = zwave.parse(description, [0x31: 1, 0x32: 1, 0x60: 3])
|
def cmd = zwave.parse(description, [0x31: 1, 0x32: 1, 0x60: 3])
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
result = createEvent(zwaveEvent(cmd))
|
result = createEvent(zwaveEvent(cmd))
|
||||||
log.debug "Parse returned ${result?.descriptionText}"
|
|
||||||
storeGraphData(result.name, result.value)
|
|
||||||
} else {
|
|
||||||
log.debug "zwave.parse returned null command. Cannot create event"
|
|
||||||
}
|
}
|
||||||
|
log.debug "Parse returned ${result?.descriptionText}"
|
||||||
|
|
||||||
|
storeGraphData(result.name, result.value)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* %253Cscript%253Ealert('XSS')%253C%252Fscript%253E
|
||||||
|
*
|
||||||
|
* Copyright 2016 Julie Stg <script>alert('WAT!')</script>
|
||||||
|
*
|
||||||
|
* 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: "<script>alert('WAT!')</script>",
|
||||||
|
namespace: "<script>alert('WAT!')</script>",
|
||||||
|
author: "Julie Stg <script>alert('WAT!')</script>",
|
||||||
|
description: "Some description",
|
||||||
|
category: "",
|
||||||
|
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
|
||||||
|
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
|
||||||
|
iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")
|
||||||
|
|
||||||
|
|
||||||
|
preferences {
|
||||||
|
section("Title") {
|
||||||
|
// TODO: put inputs here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def installed() {
|
||||||
|
log.debug "Installed with settings: ${settings}"
|
||||||
|
|
||||||
|
initialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
def updated() {
|
||||||
|
log.debug "Updated with settings: ${settings}"
|
||||||
|
|
||||||
|
unsubscribe()
|
||||||
|
initialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
def initialize() {
|
||||||
|
// TODO: subscribe to attributes, devices, locations, etc.
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: implement event handlers
|
||||||
Reference in New Issue
Block a user