

LogInfo("Universaldimmer", "Completed dimming of " + myitem + "to target " + mytarget) Timers.get(myitem).reschedule(now.plusMillis(mytime)) Mybrightness = dimm.apply(myitem, mytype, mytarget, mystep) Timers.put(myitem, createTimer(now.plusMillis(mytime)) [| Mybrightness = mybrightness - mystep.intValue
:quality(90)/article-new/2017/12/lifxconnector-800x600.jpg)
If (mybrightness > mytarget.intValue) mybrightness = mytarget.intValue Mybrightness = mybrightness + mystep.intValue (myitem.state as HSBType).getBrightness() Var dimm = [ GenericItem myitem, String mytype, Number mytarget, Number mystep | will dimm the item and report back the new brightness ndCommand('Color,0,10000,50,' + zone.name)]ĭimmer rules (widely copied from PeterK’s linked version but use a mapping to allow for multiple timers): import String universaldimmer "Trigges a rule to fade in/out a light" Items: // TODO: Deduplicate using reflection?Ĭolor Strip_C_CouchBackgroundZone0 "Couchbeleuchtung (Zone 0)" How could one achieve this? My first approach was to define each of the 16 color zones as an individual item, and to fade them out separated, based on this Universaldimmer implementation.

But I want to stretch the fade duration to 10 instead of 1 seconds. I also tried to simply fade the strip off, as the button in the app does.
