Compare commits

..

5 Commits

Author SHA1 Message Date
Neal Black
a0ba15fe1b MSA-1836: null 2017-03-13 18:21:10 -07:00
Tyler Lange
2ae163b10b Merge pull request #1764 from CosmicPuppy/ActionTiles-Fibaro-CapabilitySensorPatch
To Fibaro Flood Sensor DTHs, added Capability "Sensor" per http://doc…
2017-03-13 10:27:41 -07:00
CosmicPuppy
e3168793bd To Fibaro Flood Sensor DTHs, added Capability "Sensor" per http://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html?highlight=sensor%20actuator#actuator-and-sensor.
There are some SmartApps out there using the "Actuator" and "Sensor" Capabilities and this Device doesn't show up for them (e.g., ActionTiles).
2017-03-11 00:47:36 -08:00
Tyler Lange
0baa986c61 Merge pull request #1762 from CosmicPuppy/ActionTiles-Nyce-CapabilitySensorPatch
To Nyce sensor DTHs, added Capability "Sensor" per http://docs.smartt…
2017-03-09 12:53:49 -08:00
CosmicPuppy
8484f18a0e To Nyce sensor DTHs, added Capability "Sensor" per http://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html?highlight=sensor%20actuator#actuator-and-sensor.
There are some SmartApps out there using the "Actuator" and "Sensor" Capabilities and this Device doesn't show up for them (e.g., ActionTiles).
2017-03-09 00:05:14 -08:00
6 changed files with 5354 additions and 130 deletions

View File

@@ -40,6 +40,7 @@ metadata {
capability "Configuration" capability "Configuration"
capability "Battery" capability "Battery"
capability "Health Check" capability "Health Check"
capability "Sensor"
command "resetParams2StDefaults" command "resetParams2StDefaults"
command "listCurrentParams" command "listCurrentParams"

View File

@@ -21,6 +21,7 @@ metadata {
capability "Configuration" capability "Configuration"
capability "Battery" capability "Battery"
capability "Refresh" capability "Refresh"
capability "Sensor"
command "enrollResponse" command "enrollResponse"

View File

@@ -24,6 +24,7 @@ metadata {
capability "Contact Sensor" capability "Contact Sensor"
capability "Refresh" capability "Refresh"
capability "Health Check" capability "Health Check"
capability "Sensor"
command "enrollResponse" command "enrollResponse"

File diff suppressed because it is too large Load Diff

View File

@@ -1,130 +0,0 @@
/**
* Copyright 2016 M. Fox
*
* 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.
*
* Based on:
* Keep Me Cozy
* Author: SmartThings
*/
definition(
name: "Thermosmart",
namespace: "foxtechnology",
author: "M. Fox",
description: "V1.1n: Changes your thermostat settings automatically in response to a mode change. You can either SET the thermostate to your desired temperature or RESUME the regular schedule. ",
category: "Green Living",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/temp_thermo.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/temp_thermo@2x.png"
)
preferences {
page(name: "setThermostat")
}
def setThermostat() {
dynamicPage(name: "setThermostat", title: null, install: true, uninstall: true) {
section{
input(name: "thermostats", type: "capability.thermostat", title: "Thermostats",
description: null, multiple: true, required: true)
}
section{
input(name: "state", type: "enum", title: "State",
description: null, multiple: false, required: true, options: ["Set","Resume"], submitOnChange: true)
}
section {
label title: "Assign a name", required: false
mode title: "Set for specific mode(s)", required: true
}
if (settings.state == "Set") {
section {
input(name: "heatingSetpoint", type: "number", title: "Heating Setpoint Degrees?", required: true)
}
section {
input(name: "coolingSetpoint", type: "number", title: "Cooling Setpoint Degrees?", required: true)
}
}
}
}
def installed()
{
subscribe(thermostats, "heatingSetpoint", heatingSetpointHandler)
subscribe(thermostats, "coolingSetpoint", coolingSetpointHandler)
subscribe(thermostats, "temperature", temperatureHandler)
subscribe(location, changedLocationMode)
subscribe(app, appTouch)
}
def updated()
{
unsubscribe()
subscribe(thermostats, "heatingSetpoint", heatingSetpointHandler)
subscribe(thermostats, "coolingSetpoint", coolingSetpointHandler)
subscribe(thermostats, "temperature", temperatureHandler)
subscribe(location, changedLocationMode)
subscribe(app, appTouch)
}
def heatingSetpointHandler(evt)
{
log.debug "heatingSetpointHandler: $evt, $settings"
}
def coolingSetpointHandler(evt)
{
log.debug "coolingSetpointHandler: $evt, $settings"
}
def temperatureHandler(evt)
{
log.debug "TemperatureHandler: $evt, $settings"
}
def changedLocationMode(evt)
{
if(settings.state == "Set")
{
thermostats.setHeatingSetpoint(heatingSetpoint)
thermostats.setCoolingSetpoint(coolingSetpoint)
}
else if (settings.state == "Resume")
{
thermostats.resumeProgram()
}
}
def appTouch(evt)
{
log.debug "appTouch: $evt, $settings"
log.debug "Current state: $settings.state"
if(settings.state == "Set"){
settings.state = "Resume"
log.debug "setting state to Reset: $settings.state"
}
else {
settings.state = "Set"
log.debug "setting state to Set: $settings.state"
}
}
// catchall
def event(evt)
{
log.debug "value: $evt.value, event: $evt, settings: $settings, handlerName: ${evt.handlerName}"
}