I’m creating a simple SmartApp that allows me to select a Hello Home Phrase, Icon, and Name. I have everything working such that I can execute the Phrase and I have the tile displaying the name defined by my SmartApp when installing it. I can’t figure out how to have the tile’s icon be displayed as the user selected icon set in the configuration of the app.
Any help on customizing the Tile’s icon would be appreciated!
/**
* Phrase Button
*
* Author: Rob Farmer
*/
definition(
name: "Phrase Button",
namespace: "smartthings",
author: "Rob Farmer",
description: "Execute your Phrase on when the SmartApp is tapped or activated.",
category: "Convenience",
//iconUrl: "https://graph.api.smartthings.com/api/devices/icons/$icon",
//iconX2Url: "https://graph.api.smartthings.com/api/devices/icons/$icon"
)
preferences {
page(name: "firstPage")
}
def firstPage() {
dynamicPage(name: "firstPage", title: "First, select your Phrase",uninstall: true, install: true) {
def phrases = location.helloHome?.getPhrases()*.label
if (phrases) {
section("Phrase") {
input "onPhrase", "enum", title: "Phrase", required: false, options: phrases
}
section("UI") {
icon(title: "Icon", required: true)
label(name: "label",
title: "Name",
required: true,
multiple: false)
}
}
}
}
def installed()
{
subscribe(app, appTouch)
}
def updated()
{
unsubscribe()
subscribe(app, appTouch)
}
def appTouch(evt) {
log.debug "appTouch: $evt"
location.helloHome.execute(onPhrase)
}