Hi Patrick
Firstly I love you plugin. You did a great job designing it, and the interface is really the part I find most elegant. I currently use a modified version of the Smartswitch plugin as my daily driver for managing automated lights. Lost of the code in there was modified by myself. I do quite a bit of setup these days for other people and find your plugin just to be much better to configure and maintain. It does almost everything I need to change over to DelayLight being my own daily driver.... almost.
The one feature I use quite extensively through the use of scenes, is the ability to set the smartswitches' dim levels. The use case for this is quite simple. during late nights, certain lights still react to triggers form sensors, but to be kind to late night eyes, they are dimmed quite low...
I can think of a two of ways to achieve this with DelayLight, but none of them seem elegant:
- Use duplicate duplicate timers. and only enable the right ones. Messy clutter.
- Set dim levels outside of Timers. Most of my lights go full power when binary on is received, instead of last level. they are not actually z-wave... limitation of interface.
The fix on face value would be quite simple (expose an action on the timer that facilitates this), until you think about the one feature that really distinguishes DelayLight from SmartSwitch. The ability to include multiple devices for ON/OFF control. The only idea I could think of is to have a "global" ON dim level, and OFF dim level as part of the plugin, and leave the individual nodes dim levels empty. Then have an action that can set these variables. Not sure if this is elegant or practical.
So in conclusion. If you have any ideas how to do this either with an elegant workaround, or code, let me know. I am happy to tackle the code and design, and contribute to your Git Repo, but would not want to write anything that you don't' consider useful of appropriate. I also don't like making my own branches, as that generally leaves me without future enhancements 
Regards
Tiaan
If I understand correctly, your goal is to have different light levels for controlled loads at different times of day; a typical use case is full brightness during the day, reduced brightness at night. I do this myself in several bathrooms in my house--e.g. motion sensors turn on "main" lighting when motion is first detected, full bright during the day on two lights, and 30% on a single light at night. When no motion is detected for a period, all lights are extinguished.
I use an "on" scene with scene actions to set up the "daytime" scene: vanity lights and recessed fixtures set to 100% on. Then I add scene Lua code like this for the night exception:
if luup.is_night() then
luup.call_action( "urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", { newLoadlevelTarget=30 }, 66 ) -- undercabinet LED strips
return false
end
return true
So, if the night test in the Lua code
fails, the scene Lua returns true, so Luup runs the scene actions normally. If the night test succeeds, the scene Lua directly sets just the toe-kick LEDs to 30%, and then returns
false. The scene actions are not run by Luup when scene Lua returns
false (so the vanity and ceiling lights are not turned on).
The second part of this is setting up the DelayLightTimer instance so that the "off list" contains
all of the lights in the bathroom (shower, vanity, recessed, and WC--you don't need an "off" scene, just list the devices explicitly in DelayLight's config). This ensures that when the DelayLight timer expires, all lights in the room are turned off (including any additional lights turned on manually). In addition, the automatic and manual timing intervals should be set to the same value (I use 3600 = 1 hour).