Set Level using device ramp rate desired



I apologize for a cross-post, but I made the mistake of asking a question right before the Hubitat C8 was announced. Long story short - webCoRE Set Level does not respect device ramp rate parameters and this is causing some challenges. My recollection is that this behavior was different in the past, but I cannot easily prove it. How can we gain this functionality within webCoRE (or regain it, if my memory is correct)?

I think that this is just a matter of a default value (0?) being populated for Duration when the Set Level command is sent via webCoRE. Why is that? Because sending the Set Level command with a blank time via the Hubitat device page appears to utilize the device ramp rates instead of instant changes.

The rest of the post just addresses fixes that were suggested or considered, but none are satisfactory. At best, I am trying to recreate logic that is already baked into the device features. I am no expert in device drivers or commands, so please excuse any sloppy vernacular.

Why not just use Set Level and Transition Duration? This has some success, but the duration must be calculated each time to yield a consistent rate. So, an expression calculated time = [abs(dimmer:level - new level) / rate]. This only works for some cases. When the dimmer is turned off, it holds the previous dimmer:level value and skews the math for the next Set Level duration.

Why not replace Turn Off with Set Level = 0? That can work, except some dimmers and bulbs do not accept this as valid input. They may set the minimum dim level and stay on. I suppose that a conditional statement could check power state to select one of two calculations to emulate rate. Not sure if it would start to set the level from 0 or dimmer:level. So, perhaps set the level to 1 (using calculated time to respect the rate). Additional logic is then needed to wait for the ramp down before sending the Off command, while also properly handling any new triggers that set a different level.

Why not send on/off to utilize the device ramp rates? This would only work as desired for devices that allow pre-staging the level.


I use a number of fibaro dimmer 2 modules. I’ve set these to transition dim levels over a longer time than default. When these are switched via webcore, they transition correctly. Changing level via alexa (no WC involvement) works in the same way.

I wonder if the issue is down to the device handler rather than WC?


It looks like the matter has been resolved with an update today. It took me a while to comprehend what I was observing and attempt to communicate relevant details, so that the fix could be prepared.

The situation was limited to sending a Set Level command without setting a duration value (a special case). It behaved as expected with a duration value set.