New and need help making a smart app

Ok I am totally new to making a smart app. But here is what I want to do. If I have a virtual switch turn on. I want it to run for 1 minute then turn off. Seem simple enough. But I am having no luck. I tried to use a templet code app and change it. But it not working.

name: “Turn It On For 1 Minutes”,
namespace: “smartthings”,
author: “SmartThings”,
description: “A switch will be turned on, and then turned off after 1 minutes.”,
category: “Switch timer”,
iconUrl: “”,
iconX2Url: “

preferences {
section(“Turn on a switch for 1 minutes…”){
input “switch1”, “capability.switch”

def turnOnSwitch() {
def OneMinuteDelay = 60
runIn(OneMinuteDelay, turnOffSwitch)

def turnOffSwitch() {

Any help would be much appreciated.

groovy.lang.MissingPropertyException: No such property: id for class: java.lang.String

This is the error I am getting.

try looking into WebCoRE, it might be a better option for you, however be aware that this platform is going to be going under a major overall sometime soon as discussed in this thread.

WebCoRE Community Post

Hi, @Jason_Grandy

I’d recommend to take a look at the SmartThings RulesAPI


© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.