Turn on lights for fixed time only?

Using the classic app, I have an automation to automatically turn on certain lights ( garage lights).
Additional settings are: Automatically turn ON when something opens (garage door opens).

I want the lights to only stay on a fixed time (say 10 minutes), but there appears to be no other option available that would allow me to do this…is there a way to turn the lights back off after a fixed time?

EDIT: I should add that I have one other setting enabled: this automation is not enabled if it is DAY mode.

Are you trying to replicate in the new app cause that will do it. I don’t see an easy way with Classic without using a custom SmartApp.

EDIT: Actually you should try to use the new app now since Classic is going away.

You should be able to do this with an Automation. You IF conditions would be garage door sensor opens AND your mode, and your THEN would be to turn on the light with auto off in 10 minutes: (replace my Home mode with your Day mode)

See the post above (accidentally double posted).

I noticed a post about enhancements to the new app and I think I heard about classic app going away.
If I switch won’t I lose a lot of functionality?
At least it used to be that the new app was lacking a lot of features in the classic app I thought.

Hi @ironglass,

There have been a lot of improvements, but losing functionality depends upon your setup. If you use custom device handlers, then the new app will struggle showing you the same tiles for that device, but the capabilities are still there for us with smartapps and some automations. It also depends on what SmartApps you may be using, especially ones that control Smart Home Monitor (now called SmartThings Home Monitor - STHM in the new app).

Depending on how complex your setup is, you may not get notified right away to migrate, but if you’re pretty much “out of the box”, you may move faster than others. I’ve got a large ST implementation with custom apps and device handlers, but I’ve moved (manually). It’s not a simple process, and there were things in Classic (custom SHM rules for example) that did not easily “map” to the new app. I had to use a combination of Scenes and Automations (sometimes 2 or 3) to do what 1 custom SHM rule did in Classic, but it is doable.

If you use your phone(s) as presence sensors, they work, but they do not show up in your list of devices.

You can use both apps at the same time, but I do not recommend setting up STHM or phone presence because you will not like the experience. Since it’s been a while since you’ve caught up on this Classic/new app topic, I don’t recommend you try moving over yet until 1) ST notifies you, or 2) you read up on a few discussions about the topic so you know what to do and what to (or not to) expect. Here’s a good starting point:

I know that’s a large discussion to digest, but there’s valuable info in there, as well as links to other similar discussions.

OK thanks … I think I can wait for now.
I don’t recall if I have any custom stuff: maybe 1 or 2…I forget offhand!
I will ride out the limitation for the moment.

Is there a hard cut off date by which everyone would have been advised to switch?

Hello @ironglass,

Another approach could be installing your automation using the Rules API. Using them, you can migrate the automations smoothly.
Below you can find an example, the workflow is:

  1. IF the door is opened
  2. THEN turn ON the specified devices (which could be lights, smart plugs, and others)
  3. AFTER 10 minutes, turn off those devices.
{
    "name": "If the door is opened, turn lights on and after 10 min turn them off",
    "actions": [
        {
            "if":{
                "equals": {
                    "left": {
                        "device": {
                            "devices": [
                                "device-id-garageDoor"
                            ],
                            "component": "main",
                            "capability": "doorControl",
                            "attribute": "door"
                        }
                    },
                    "right": {
                        "string": "open"
                    }
                },
                "then":[
                    {
                        "command": {
                            "devices": [
                                "device-id-light1","device-id-light2",...
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "on"
                                }
                            ]
                        }
                    },
                    {
                        "sleep": {
                            "duration": {
                                "value": {
                                    "integer": 10
                                },
                                "unit": "Minute"
                            }
                        }
                    },
                    {
                        "command": {
                            "devices": [
                                "device-id-light1","device-id-light2",...
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "off"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

The instructions to install a Rule can be found at this thread. As specified there, you need to replace the device IDs with the corresponding values.

When you query the device list, you can visualize which capabilities are available for each one of them, and based on that, you can modify the conditions/commands of the rule according to your needs. For more information, you can visit:
https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#operation/createRule

Let me know if you have any doubts.

Thanks … that doesn’t look too bad!
But is there any site that explains the syntax rules?
The one qualification I would need to add is to only act at night (mode is NIGHT).

Here you go:

No hard dates listed, but this provides a little more detail than that earlier discussion.

Hello @ironglass,

Below you can find a sample with the time condition.

{
    "name": "Turn lights on with timer when the garage door is opened",
    "actions": [
        {
            "if": {
                "and":[
                    {
                        "equals": {
                            "left": {
                                "device": {
                                    "devices": [
                                        "device-id-garageDoor"
                                    ],
                                    "component": "main",
                                    "capability": "doorControl",
                                    "attribute": "door"
                                }
                            },
                            "right": {
                                "string": "open"
                            }
                        }
                    },
                    {
                      "between": {
                        "value": {
                          "time": {
                            "reference": "Now"
                          }
                        },
                        "start": {
                          "time": {
                            "reference": "Sunset"
                          }
                        },
                        "end": {
                          "time": {
                            "reference": "Sunrise"
                          }
                        }
                      }
                    }
                ],
                "then": [
                    {
                        "command": {
                            "devices": [
                                "device-id-light1","device-id-light2",...
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "on"
                                }
                            ]
                        }
                    },
                    {
                        "sleep": {
                            "duration": {
                                "value": {
                                    "integer": 10
                                },
                                "unit": "Minute"
                            }
                        }
                    },
                    {
                        "command": {
                            "devices": [
                                "device-id-light1","device-id-light2",...
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "off"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

About the rule syntax, you can check this document where you can find the different conditions and commands you can use.

In this post, you can find another example using this type of condition.

In the old app go to Smart Apps and install Smart Lighting you can then set the device to go off after a certain length of time if you set it up under power allowance. I have one set so whenever the smart button activates the Wemo plug it times out and switches off after 4hrs.

Thanks!! I will give that a try.

Thanks for the idea Darren … will look at this too!