I’m trying out CoRE for the first time, and I noticed that for lighting (dimmable) there’s a “Fade to Level” task, and a “Set to Temperature” task, but not a “Fade to Temperature” task.
This would have been perfect for gradually adjusting the light temperature at sunrise/sunset.
Any reasons why it’s not set up that way? Can it be?
The reason CoRE supports Fade to Level is that is is really calling the device handlers
setLevel(level, duration) method. If the DH doesn’t have this method, it falls back to just
setColorTemperature(kelvin, duration) isn’t a standard method in RBG/W device handlers.
Thanks for the detailed response. Understood.
well… since this is a Community based Rule Editor, I guess the next question is: Could it be a standard method?
I guess the RBG/W Handlers are built in to SmartThings, but couldn’t this setColorTemperature(kelvin, duration) be added as a custom device handler?
It could, but…
Most of the smart lights have native support for setLevel(level, duration) meaning the slow dimming happens on the device and not in the device handler. SmartThings limits your code from executing longer than 20 seconds, so the max seconds one could pick would be < 20 seconds and the device handler would have to do the actual dimming via a loop.
Perhaps you could write a CoRE rule to trigger at sunset, set temperature, wait, set lower temperature, wait… until you reach your goal? It wouldn’t be as smooth a transition as the native fade of lux, but may work fairly well.