Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#43131 from SmartThingsCommuni…
Browse files Browse the repository at this point in the history
…ty/acceptance

Rolling up acceptance to production for deploy
  • Loading branch information
greens authored Sep 8, 2020
2 parents 9769679 + 8c6250c commit 87591b2
Show file tree
Hide file tree
Showing 9 changed files with 2,455 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Copyright 2020 SmartThings
*
* 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.
*
* Child Color Selection
*
* Copyright 2020 SmartThings
*
*/
metadata {
definition(name: "Child Color Control", namespace: "smartthings", author: "SmartThings", mnmn: "SmartThings") {
capability "Color Control"
capability "Actuator"
}

tiles(scale: 2){
multiAttributeTile(name:"switch", type: "generic", width: 6, height: 4, canChangeIcon: true){
tileAttribute ("device.color", key: "COLOR_CONTROL") {
attributeState "color", action:"setColor"
}
}

main(["switch"])
details(["switch"])
}
}

def setColor(value) {
parent.childSetColor(value)
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ metadata {
input description: "Enter the menu by press and hold B-button for 3 seconds. Once indicator glows WHITE, release the B-button. Visual indicator will start changing colours in sequence. Press B-button briefly when visual indicator glows GREEN",
title: "To check smoke detection state", displayDuringSetup: true, type: "paragraph", element: "paragraph"
input description: "Please consult Fibaro Smoke Sensor operating manual for advanced setting options. You can skip this configuration to use default settings",
title: "Advanced Configuration", displayDuringSetup: true, type: "paragraph", element: "paragraph"
input "smokeSensorSensitivity", "enum", title: "Smoke Sensor Sensitivity", options: ["High","Medium","Low"], defaultValue: "${smokeSensorSensitivity}", displayDuringSetup: true
input "zwaveNotificationStatus", "enum", title: "Notifications Status", options: ["disabled","casing opened","exceeding temperature threshold", "lack of Z-Wave range", "all notifications"],
title: "Advanced settings", displayDuringSetup: true, type: "paragraph", element: "paragraph"
input "smokeSensorSensitivity", "enum", title: "Smoke sensor sensitivity", options: ["High", "Medium", "Low"], defaultValue: "${smokeSensorSensitivity}", displayDuringSetup: true
input "zwaveNotificationStatus", "enum", title: "Notifications", options: ["None", "Casing opened", "Exceeding temperature threshold", "Lack of Z-Wave range", "All"],
// defaultValue: "${zwaveNotificationStatus}", displayDuringSetup: true
//Setting the default to casing opened so it can work in SmartThings mobile app.
defaultValue: "casing opened", displayDuringSetup: true
input "visualIndicatorNotificationStatus", "enum", title: "Visual Indicator Notifications Status",
options: ["disabled","casing opened","exceeding temperature threshold", "lack of Z-Wave range", "all notifications"],
defaultValue: "Casing opened", displayDuringSetup: true
input "visualIndicatorNotificationStatus", "enum", title: "Visual indicator notifications status",
options: ["None", "Casing opened", "Exceeding temperature threshold", "Lack of Z-Wave range", "All"],
defaultValue: "${visualIndicatorNotificationStatus}", displayDuringSetup: true
input "soundNotificationStatus", "enum", title: "Sound Notifications Status",
options: ["disabled","casing opened","exceeding temperature threshold", "lack of Z-Wave range", "all notifications"],
input "soundNotificationStatus", "enum", title: "Sound notifications status",
options: ["None", "Casing opened", "Exceeding temperature threshold", "Lack of Z-Wave range", "All"],
defaultValue: "${soundNotificationStatus}", displayDuringSetup: true
input "temperatureReportInterval", "enum", title: "Temperature Report Interval",
options: ["reports inactive", "5 minutes", "15 minutes", "30 minutes", "1 hour", "6 hours", "12 hours", "18 hours", "24 hours"], defaultValue: "${temperatureReportInterval}", displayDuringSetup: true
input "temperatureReportHysteresis", "number", title: "Temperature Report Hysteresis", description: "Available settings: 1-100 C", range: "1..100", displayDuringSetup: true
input "temperatureThreshold", "number", title: "Overheat Temperature Threshold", description: "Available settings: 0 or 2-100 C", range: "0..100", displayDuringSetup: true
input "excessTemperatureSignalingInterval", "enum", title: "Excess Temperature Signaling Interval",
input "temperatureReportInterval", "enum", title: "Temperature report interval",
options: ["Reports inactive", "5 minutes", "15 minutes", "30 minutes", "1 hour", "6 hours", "12 hours", "18 hours", "24 hours"], defaultValue: "${temperatureReportInterval}", displayDuringSetup: true
input "temperatureReportHysteresis", "number", title: "Temperature report hysteresis", description: "Available settings: 1-100 C", range: "1..100", displayDuringSetup: true
input "temperatureThreshold", "number", title: "Overheat temperature threshold", description: "Available settings: 0 or 2-100 C", range: "0..100", displayDuringSetup: true
input "excessTemperatureSignalingInterval", "enum", title: "Excess temperature signaling interval",
options: ["5 minutes", "15 minutes", "30 minutes", "1 hour", "6 hours", "12 hours", "18 hours", "24 hours"], defaultValue: "${excessTemperatureSignalingInterval}", displayDuringSetup: true
input "lackOfZwaveRangeIndicationInterval", "enum", title: "Lack of Z-Wave Range Indication Interval",
input "lackOfZwaveRangeIndicationInterval", "enum", title: "Lack of Z-Wave range indication interval",
options: ["5 minutes", "15 minutes", "30 minutes", "1 hour", "6 hours", "12 hours", "18 hours", "24 hours"], defaultValue: "${lackOfZwaveRangeIndicationInterval}", displayDuringSetup: true
}
tiles (scale: 2){
Expand Down Expand Up @@ -119,9 +119,28 @@ metadata {

def updated() {
log.debug "Updated with settings: ${settings}"
if(!state.legacySettingsUpdated) updateLegacySettings()
setConfigured("false") //wait until the next time device wakeup to send configure command
}

def updateLegacySettings() {

def legacyNotificationOptionMap = [
"disabled" : "None",
"casing opened" : "Casing opened",
"exceeding temperature threshold" : "Exceeding temperature threshold",
"lack of Z-Wave range" : "Lack of Z-Wave range",
"all notifications" : "All"
]

device.updateSetting("temperatureReportInterval", temperatureReportInterval == "reports inactive" ?: "Reports inactive")

device.updateSetting("zwaveNotificationStatus", legacyNotificationOptionMap[zwaveNotificationStatus] ?: zwaveNotificationStatus)
device.updateSetting("visualIndicatorNotificationStatus", legacyNotificationOptionMap[visualIndicatorNotificationStatus] ?: visualIndicatorNotificationStatus)
device.updateSetting("soundNotificationStatus", legacyNotificationOptionMap[soundNotificationStatus] ?: soundNotificationStatus)

state.legacySettingsUpdated = true
}


def parse(String description) {
Expand Down Expand Up @@ -481,15 +500,15 @@ private def getTimeOptionValueMap() { [
"12 hours" : 4320,
"18 hours" : 6480,
"24 hours" : 8640,
"reports inactive" : 0,
"Reports inactive" : 0,
]}

private def getNotificationOptionValueMap() { [
"disabled" : 0,
"casing opened" : 1,
"exceeding temperature threshold" : 2,
"lack of Z-Wave range" : 4,
"all notifications" : 7,
"None" : 0,
"Casing opened" : 1,
"Exceeding temperature threshold" : 2,
"Lack of Z-Wave range" : 4,
"All" : 7,
]}

private command(physicalgraph.zwave.Command cmd) {
Expand Down
Loading

0 comments on commit 87591b2

Please sign in to comment.