Using transitionDuration with ZwaveJS node V11

hi @marcus-j-davies installed the new version changed my flows as instructed, All working very well !
Thank you
As a side note how do i use transitionduration?
I was hoping to switch on a binary input then using the duration switch it off ? is this what it is designed for?
Please forgive my question if it seems simple but its a learning curve for me.
Thanks again for a wonderful node

Hi @magicman

transitionDuration needs to be supported by the target device for it to have an effect.
it can be used to say change the value of a multilevel switch (dimmer), or an RGB controller (transition to a different colour)

/* Dimming down a light (Multilevel Switch) over 3s */
const Node = 5;
const ValueID = {
    commandClass: 0x26,
    endpoint: 0,
    property: 'targetValue'
}
const SetValueOptions = {
    transitionDuration: '3s',
};

msg.payload = {
    cmd: {
        api: 'VALUE',
        method: 'setValue'
    },
    cmdProperties: {
        nodeId: Node,
        valueId: ValueID,
        value: 25, /* Say from its current value of 100 */
        setValueOptions: SetValueOptions
    }
}

I have never had a device that I can test this with - but it's a set value option in the Driver, that this is designed for.

It could work for a binary switch, as long as its supported by the device

EDIT
The above is verbose of course, but the Factory Node has full support for applying options :smiley: