Code by Scott שאול בן ישוע
Verified Commit 25d103c9 authored by Sha'ul ben Yeshua's avatar Sha'ul ben Yeshua 🎗
Browse files

colour changes

parent 9eb185ef
......@@ -4,6 +4,8 @@
* Inovelli Scene Creator Child
*
* Original Authors: SmartThings, modified by Bruce Ravenel, Dale Coffing, Stephan Hackett
*
* Code re-use permission given by Stephan Hackett @stephack
*
* Modified for Inovelli Scene control by Scott Grayban (Scott_Inovelli)
*
......@@ -126,26 +128,6 @@ def getButtonSections(buttonNumber) {
if(i==23) section("\n"+getFormat("header", "${getImage("Rule", "45")}"+" RULE CONTROL")){}
if(i==24) section("\n"+getFormat("header", "${getImage("Other", "45")}"+" OTHER")){}
}
section(getFormat("section", "Notifications (SMS):"), hideable:true , hidden: !shallHide("notifications_${buttonNumber}")) {
input "notifications_${buttonNumber}_pushed", "text", title: "Message To Send When Pushed:", description: "Enter message to send", required: false, submitOnChange: collapseAll
input "phone_${buttonNumber}_pushed","phone" ,title: "Send Text To:", description: "Enter phone number", required: false, submitOnChange: collapseAll
if(showHeld()) {
paragraph getFormat("line")
input "notifications_${buttonNumber}_held", "text", title: "Message To Send When Held:", description: "Enter message to send", required: false, submitOnChange: collapseAll
input "phone_${buttonNumber}_held", "phone", title: "Send Text To:", description: "Enter phone number", required: false, submitOnChange: collapseAll
}
if(showDouble()) {
paragraph getFormat("line")
input "notifications_${buttonNumber}_doubleTapped", "text", title: "Message To Send When Double Tapped:", description: "Enter message to send", required: false, submitOnChange: collapseAll
input "phone_${buttonNumber}_doubleTapped", "phone", title: "Send Text To:", description: "Enter phone number", required: false, submitOnChange: collapseAll
}
if(showRelease()) {
paragraph getFormat("line")
input "notifications_${buttonNumber}_released", "text", title: "Message To Send When Released:", description: "Enter message to send", required: false, submitOnChange: collapseAll
input "phone_${buttonNumber}_released", "phone", title: "Send Text To:", description: "Enter phone number", required: false, submitOnChange: collapseAll
}
}
}
}
......@@ -166,16 +148,15 @@ def getImage(type, mySize) {
if(type == "Sirens") return "${loc}Sirens.png height=30 width=30> "
if(type == "Scenes") return "${loc}Scenes.png height=30 width=30> "
if(type == "Shades") return "${loc}Shades.png height=30 width=30> "
if(type == "SMS") return "${loc}SMS.png height=30 width=30> "
if(type == "Speech") return "${loc}Audio.png height=30 width=30> "
if(type == "Rule") return "${loc}Rule.png height=${mySize} width=${mySize}> "
}
def getFormat(type, myText=""){
if(type == "section") return "<div style='color:#78bf35;font-weight: bold'>${myText}</div>"
if(type == "section") return "<div style='color:#AA0000;font-weight: bold'>${myText}</div>"
if(type == "command") return "<div style='color:red;font-weight: bold'>${myText}</div>"
if(type == "header") return "<div style='color:#ffffff;background-color:#392F2E;text-align:center'>${myText}</div>"
if(type == "line") return "\n<hr style='background-color:#78bf35; height: 2px; border: 0;'></hr>"
if(type == "header") return "<div style='color:#ffffff;background-color:#AA0000;text-align:center'>${myText}</div>"
if(type == "line") return "\n<hr style='background-color:#AA0000; height: 2px; border: 0;'></hr>"
}
def shallHide(myFeature) {
......@@ -341,7 +322,6 @@ def getPrefDetails(){
[id:"speechDevice_", sOrder:30, desc:'Send Msg To', comm:speechHandle, type:"normal", secLabel: getFormat("section", "Notifications (Speech):"), sub:"speechTxt", cap: "capability.speechSynthesis", subType:"text", sTitle: "Message To Speak:", sDesc:"Enter message to speak (Random messages: Use ; to separate choices)", mul: true],///set type to normal instead of sub so message text is not displayed
[id:"notifications_", desc:'Send Push Notification', comm:messageHandle, sub:"valNotify", type:"bool"],
[id:"phone_", desc:'Send SMS', comm:smsHandle, sub:"notifications_", type:"normal"],
]
return detailMappings
}
......
/*
* Hubitat Import URL: https://raw.githubusercontent.com/sgrayban/ABC-Button/master/apps/Inovelli-Scene-Creator/Inovelli-Scene-Creator.groovy
*
*
* Advanced Button Controller (Parent/Child Version)
* Inovelli Scene Creator (Parent/Child Version)
*
* Original Author: Stephan Hackett
* Code re-use permission given by Stephan Hackett @stephack
* Modified for Inovelli Scene control by Scott Grayban (Scott_Inovelli)
*
*/
......@@ -30,7 +30,7 @@ preferences {
def mainPage() {
return dynamicPage(name: "mainPage", title: "", install: true, uninstall: true) {
if(!state.abcInstalled) {
section("Hit Done to install ABC App!") {
section("Hit Done to install Inovelli Scene Creator!") {
}
}
else {
......@@ -43,8 +43,8 @@ def mainPage() {
def appHead = "<img src=https://raw.githubusercontent.com/sgrayban/ABC-Button/master/apps/Inovelli-Scene-Creator/resources/Inovelli-Scene-App.png> \n${checkForUpdate()}"
paragraph "<div style='text-align:center'>${appHead}</div>"
}
section("Create a new Inovelli scene mapping.") {
app(name: "childApps", appName: "Inovelli Scene Creator Child", namespace: "Inovelli", title: "<img src=https://raw.githubusercontent.com/sgrayban/ABC-Button/master/apps/Inovelli-Scene-Creator/resources/New.png height=50 width=50> New Button Device Mapping", multiple: true)
section("Create a new Inovelli Scene.") {
app(name: "childApps", appName: "Inovelli Scene Creator Child", namespace: "Inovelli", title: "<img src=https://raw.githubusercontent.com/sgrayban/ABC-Button/master/apps/Inovelli-Scene-Creator/resources/New.png height=50 width=50> New Inovelli Scene", multiple: true)
}
section("") {
href (name: "aboutPage", title: "User's Guide",
......@@ -147,7 +147,6 @@ private def textHelp() {
" Scenes - Cycle Scenes \n"+
" Shades - Up, Down, or Stop \n"+
" Sirens - Toggle \n"+
" Speech Notifications \n"+
" SMS Notifications"
" Speech Notifications"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment