Skip to content

Instantly share code, notes, and snippets.

@nayelyzarazua-bluetrail
Last active November 27, 2020 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nayelyzarazua-bluetrail/510088fa9e390389465d2c010a9033e1 to your computer and use it in GitHub Desktop.
Save nayelyzarazua-bluetrail/510088fa9e390389465d2c010a9033e1 to your computer and use it in GitHub Desktop.
SmartApp_showLargeText
/**
* largeTextSolution
*
* Copyright 2020 Smart Things
*
* 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: "largeTextSolution",
namespace: "nayelyz",
author: "Smart Things",
description: "SmartApp to display large text",
category: "My Apps",
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 {
page(name: "deviceRoutines")
}
def deviceRoutines() {
dynamicPage(name: "deviceRoutines", title: "Device Routines", install: true, uninstall: true) {
section("Device with the routines") {
input "textdev", "capability.namespace.largetextdisplay", submitOnChange: true
}
if (textdev) {
section("paragraph") {
paragraph "Routines"
paragraph title: "Routines Config",
required: true,
getRoutines()
}
}
}
}
def getRoutines(){
log.debug "getRoutines"
def currentValue = textdev.currentValue("text")
return currentValue
}
def installed() {
log.debug "Installed with settings: ${settings}"
sendPush("installed");
}
def updated() {
initialize()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment