Switch at sunset - add offset & also show in Lights & Switches?

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.

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.

1 Like

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: