I want to set a light color, and change it 15 minutes later, and again 5 minuts after that

Looking to build a lighting automation for my son.

We want to send him to bed and have a lighting setup that changes colors as he approaches time for bed.

Thinking something like

  1. Green for 15 minutes
  2. Yellow for 15 minutes
    3)Red for 5 minutes
  3. off

i’m using TP link Kasa lights which are integrated already.

Create virtual momentary buttons for Green, Yellow, and Red with auto-revert set to 15 mins.

If
“Bedtime” (whatver that condition is for you)
then
Set Kasa Light to Green
Turn on Green virtual device

If
Green Virtual device off
then
Set Kasa Light to Yellow
Turn on Red virtual device

If
Red Virtual device off
then
Turn off Kasa Light

1 Like

Can you give some details on how to set the timers?

I have created the virtual switches.

I have choices of either

“Stays in this status for how long?” in the routine itself,

or making it part of the condition to “Auto turn off” or “Delay this action”

Virtual momentary buttons using vEdge Creator have a setting for how long before the button auto-reverts. So, once the virtual button is turned on, it will stay on for amount of time and then turn off.

Alternatively, if you create a basic virtual switch, you could “Auto turn off after X time” in your routine.

For the “turn on in a color” portion, I often use scenes for these. That way your logic routines simply call a scene for each specific stage, what colors they happen to set is configured in the scene. The scenes would be named “go to bed warning”, etc.

Downside is that scenes are not local and require the cloud.

1 Like

This would simplify the Actions portion of the Routines, but you would still need multiple Routines and virtual switches to trigger the desired progression.

Thinking about this a little bit further, using the Edge Counter Utility from @TAustin, you could probably simplify the whole thing by doing something like this:

If
“Bedtime” (whatver that condition is for you)
then
Set Kasa Light to Green
Turn on Counter Device

If
Counter Device = 15 mins
then
Set Kasa Light to Yellow
Turn on Counter Device

If
Counter Device = 5 mins
then
Turn off Kasa Light
Turn off Counter Device

You’ll need to set the Duration Resolution to Minutes in settings. I’m relatively sure that turning on the Counter Device when it is already on resets the time to zero and restarts the count. If not, you would simply need to turn it off and back on in the first two routines.

Thanks all,

I was able to achieve this with a scene and a handful of routines.

Scene:
Turn on LED’s
Set color to Green
Set dimmer to 75%

This turns on the lights and sets them to green.

Routine 1
Looks for lights at 75%
Action:
Turn on
Color control to yellow
Dimmer to 65%
Delay this action for 15 minutes

Routine 2
Looks for lights at 65%
Action:
Turn on
Color control to red
Dimmer to 50%
Delay this action for 15 minutes

Routine 3
Looks for lights at 50%
Action:
Turn off
Delay this action for 5 minutes

1 Like