Compare commits

...

1 Commits

Author SHA1 Message Date
jamie peach
b85fcf1d57 MSA-2975: LIFX LIGHTS 2018-08-31 22:30:25 -07:00
2 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
/**
* lights
*
* Copyright 2018 jamie peach
*
* 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.
*
*/
metadata {
definition (name: "lights", namespace: "LIFX APP ", author: "jamie peach") {
capability "Activity Lighting Mode"
capability "Color"
capability "Color Control"
capability "Color Mode"
capability "Color Temperature"
capability "Configuration"
capability "Light"
capability "Light"
}
simulator {
// TODO: define status and reply messages here
}
tiles {
// TODO: define your main and details tiles here
}
}
// parse events into attributes
def parse(String description) {
log.debug "Parsing '${description}'"
// TODO: handle 'lightingMode' attribute
// TODO: handle 'colorValue' attribute
// TODO: handle 'hue' attribute
// TODO: handle 'saturation' attribute
// TODO: handle 'color' attribute
// TODO: handle 'colorMode' attribute
// TODO: handle 'colorTemperature' attribute
// TODO: handle 'switch' attribute
// TODO: handle 'switch' attribute
}
// handle commands
def setLightingMode() {
log.debug "Executing 'setLightingMode'"
// TODO: handle 'setLightingMode' command
}
def setColorValue() {
log.debug "Executing 'setColorValue'"
// TODO: handle 'setColorValue' command
}
def setHue() {
log.debug "Executing 'setHue'"
// TODO: handle 'setHue' command
}
def setSaturation() {
log.debug "Executing 'setSaturation'"
// TODO: handle 'setSaturation' command
}
def setColor() {
log.debug "Executing 'setColor'"
// TODO: handle 'setColor' command
}
def setColorTemperature() {
log.debug "Executing 'setColorTemperature'"
// TODO: handle 'setColorTemperature' command
}
def configure() {
log.debug "Executing 'configure'"
// TODO: handle 'configure' command
}
def off() {
log.debug "Executing 'off'"
// TODO: handle 'off' command
}
def on() {
log.debug "Executing 'on'"
// TODO: handle 'on' command
}
def off() {
log.debug "Executing 'off'"
// TODO: handle 'off' command
}
def on() {
log.debug "Executing 'on'"
// TODO: handle 'on' command
}

View File

@@ -0,0 +1,50 @@
/**
* SMART THINGS
*
* Copyright 2018 jamie peach
*
* 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: "SMART THINGS",
namespace: "LIFX APP",
author: "jamie peach",
description: "CONTROL MY LIGHTS\r\n",
category: "SmartThings Labs",
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