OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

switch multilevel duration problem #2645

Open kdschlosser opened 1 year ago

kdschlosser commented 1 year ago

The duration value for a multilevel switch is flawed. If the device supports version 4 of the command class there is going to be a bumping of heads because the duration value is used by both the report command and also by the set command. If there is a current transition taking place there are going to be reports that contain the mount of time left. The bumping of heads is going to occur if there is a transition happening and the user wants to change the transition. They would set the duration and then set the level. If a report comes in after the user sets the duration but before the user sets the level the duration from the report is going to get used instead of the duration a user has set.

The fix would be to add a "target_duration" value just like there is a target_level value.