I have a light that I want to turn on an hour before sunset. I saw in the developer documentation that there is example code that takes sunset with offset, and it’s pretty much 100% there.
But by doing this, I lose the shortcut of having the light switch in the “Lights & Switches” category.
Is there a way to modify the built-in script to have an offset or is there a way for a SmartApp to publish into the Lights & Switches category?
I’m not quite sure what the issue is: creating a custom smartapp with offset won’t remove the light from a Lights and Switches Shortcut. They just become two parallel means of control. But perhaps I’m not understanding something?
Meanwhile, I did want to mention that there is an offset option built in to Hello Home Actions, which might be the fastest solution.
Leave the Shortcut group as is.
Set up a parallel Hello Home Action with the offset, including whatever individual lights you like.
This is one of the differences between shortcuts and hello home actions.
This could all change in the future, but as of March 2015 there are a few functionality differences between Shortcut Groups and Hello Home Actions I thought it would be helpful to document. Please add more if you know of them.
All of the following apply to features of the standard mobile app, not custom code.
Trigger after inaction on motion sensor: Available through SG, not available in HHA
Turn off after a specified number of minutes available in SG, not HHA
Trigger a light from a motion sensor you can do this in both, but they have different names. In a shortcut group, it is “turn on when there is motion.” In HHA, it is “turn on when things start happening” and for the HHA, it is only available if you are also changing the mode. The advantage of using in an HHA is that you can…
But again setting up the Hello Home Action doesn’t remove a light from its shortcut group, it’s just a parallel means of control.
Great info here, I’ll check it out. And sorry for the confusion - my initial issue was that by removing the built-in smartapp amd making my own, I lose the shortcut out of “Lights & Switches”.
I’ll read these links you’ve posted for more info. Thanks
If you need more info about Hello Home Actions, this might also be of interest:
(March 2018: All of the following applies only to the SmartThings Classic app. If you purchased your hub after March 1, 2018 and are using the new “SmartThings (Samsung Connect)” app, creating rules works differently.)
You’ve got your hub. You’ve got some devices. Now how do you schedule what happens when?
SmartThings doesn’t have a rules engine/scheduler, so there’s no one tutorial for how to do this. But it’s an open platform, and there are about 12 different ways to set up various kinds of schedules. Some require custom code, some don’t.
A “scheduler” in this context is anything that causes a networked device to perform an action, even if it’s just to toggle on or off immediately. (Network engineering definition, forgive me.
(Note: as of April 2017, the original author of …