HomeKit Dimmer sends ON before level

So, I just got my first Z-Wave dimmer installed (Leviton VRMX1-1LZ). It seems that when setting the level of a dimmer with HomeKit, the item is first sent the ON command, followed by a level, even if the dimmer is already turned on. Now, from what I can tell, HomeKit will always send a level following the ON command, even if you simply try to turn on the dimmer. This results in some pretty odd behavior when changing the level, causing the dimmer to go to 100% before the set point. For example, turning on the dimmer by setting the dimmer to 50% will result in the lights going to 100% then 50%. Then setting it to 25% will result in the lights brightening to 100% then dropping to 25%. I have not experienced a similar behavior when controlling the dimmer from the Paper UI. I have come up with the following rule which appears to mitigate this:

rule "lr_Dimmer switched"
when   
        Item lr_Dimmer received command
then   
        if (receivedCommand != ON) {
                zwave_device_7313d737_node6_switch_dimmer.sendCommand(receivedCommand) 
        }
end
2 Likes