Kids Reading Lights?

I’ve got some reading lights in my kids bedrooms that I would like to automate. When they go to bed they get a certain amount of reading time (10 minutes, 20 minutes, etc). The time varies based on their age (the older kids get more time) as well as how late it is when they start reading. Many nights we realize that we’ve forgotten to turn the reading lights off after the allotted time and they end up staying up later than anticipated. Ideally what I’d like to do is turn the lights on with a variable timer and then as the timer is approaching zero start to dim the lights to warn them that the lights are about to turn off. The only ideas I’ve been able to come up with involve creating several virtual switches (one for each possible kid and allotted time combo - which is a lot) and then tying each of those virtual switches to a CoRE piston. I could then turn each of those virtual switches on using Alexa, which is the end goal. This all seems doable but as I mentioned, very time consuming. Anyone had luck doing something similar and if so how did you do it?

There are a couple ways to do this, but I think Core may be the most straightforward. So start by asking in the core peer assistance thread, and the folks there can help you figure out the most efficient way to do it. :sunglasses:

If each kid has a reading lamp (which is the way I understand your post), you should just need to write a CoRE piston for each lamp. Within the given piston, you can set conditions that will set the ‘keep on’ time in relation to which time it was turned on. That is, if turned on between 6-7pm, dim to 100%, the wait 28 min, then dim to 50%, wait 2 minutes, then off. If turned on between 7-8pm, dim to 100%, wait 13 min, then dim to 50%, wait 2 min, then off. Etc… I use a similar piston to control my afternoon Lights. I do it with a lux sensor, and as the sensor falls below specific levels the lights get brighter. With a little tweaking, it should be easy enough to adapt to what you need.

Then each light just needs to be accessible by your Echo…all she needs to know is you want the light turned on…CoRE will do the rest.