Thanks! I ended up hacking it - changing my simulated pushbutton to a simulated switch and having the event handler ‘on’ event immediately turn off the switch. That allowed me to export the switch via the Alexa SmartApp and import into Alexa… “Alexa, turn on Good Night”, “Alexa, turn on Good Morning”
/**
*/
definition(
name: “Routine Trigger 2”,
namespace: “spickelmier”,
author: “Rick Spickelmier”,
description: “Trigger SmartThings routines from switches”,
category: “”,
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: “configure”)
}
def configure() {
dynamicPage(name: “configure”, title: “Configure Switch and Routine”, install: true, uninstall: true) {
section(“Select your switch”) {
input “theswitch”, “capability.switch”, required: true
}
def actions = location.helloHome?.getPhrases()*.label
if (actions) {
actions.sort()
section("Routine to Trigger") {
log.trace actions
input "onAction", "enum", title: "Routine to execute when button pushed", options: actions, required: true
}
}
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
initialize()
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}
def initialize() {
subscribe(theswitch, “switch”, handler)
log.debug “selected on routine $onAction”
}
def handler(evt) {
if (evt.value == “on”) {
log.debug "switch turned on, will execute routine ${settings.onAction}"
location.helloHome?.execute(settings.onAction)
theswitch.off();
}
}