Z-Wave JS - Why is Dimmer changing from OFF to ON in multiple steps?

I have moved from using the original ZWave to the new Z-Wave JS Add-on (running Home Assistant OS).

I noticed that my Qubino Dimmers (ZMNHDD) now take noticeably longer to turn on or off. Looking at debug logs, shows that this is due to the dimmer transitioning through a series of intermediate values - i.e. ramping from the off-state to the on-state. See below:

2021-04-12 16:09:39 DEBUG (MainThread) [zwave_js_server] Publishing message:
{'command': 'node.set_value',
 'messageId': 'xxxxxxxxxxxxxxxxxxxxxxxxxx98a96',
 'nodeId': 31,
 'value': 255,
 'valueId': {'ccVersion': 3,
             'commandClass': 38,
             'commandClassName': 'Multilevel Switch',
             'endpoint': 0,
             'metadata': {'label': 'Target value',
                          'max': 99,
                          'min': 0,
                          'readable': True,
                          'type': 'number',
                          'writeable': True},
             'property': 'targetValue',
             'propertyName': 'targetValue',
             'value': 0}}

2021-04-12 16:09:39 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":true,"messageId":"xxxxxxxxxxxxxxxxxxxxxxxxxx98a96","result":{"success":true}}', extra='')

2021-04-12 16:09:39 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":18,"prevValue":0,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:39 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 18
2021-04-12 16:09:40 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":27,"prevValue":18,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:40 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 27
2021-04-12 16:09:41 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":63,"prevValue":27,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:41 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 63
2021-04-12 16:09:42 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":90,"prevValue":63,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:42 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 90
2021-04-12 16:09:44 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":99,"prevValue":90,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:44 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 99

Any idea how I can get the dimmer to turn on immediately (i.e. directly from 0 to 99)?

This “feature” of the new Z-Wave JS results in strange behaviour of the UI when turning a dimmer from ON to OFF.

Clicking on the “Switch” icon results in the following:

  • The initial state is ON (max brightness) image

  • The Switch icon immediately changes to OFF image

  • The Switch icon then goes to 81% brightness) image

  • The Switch icon then fades to the OFF state over a few seconds (it goes through brightness steps 81%, 63%, 27%, 0%).

The actual light does not go OFF-ON-OFF, it just fades from ON to OFF.

I cannot find any setting that determines this behaviour, so would appreciate any pointers on how this can be adjusted.

I also observe a long time response from my ZWave Qubino dimmer from OFF to ON with ZWave JS : about 3 to 4 seconds sometimes.

@Shaad Thanks for confirming. This is definitely new behaviour - it did not do this in the original ZWave or OZW.

I have also checked that, the “Dimming duration” parameter is set to 0.
The dimming ramp up/down time also does not follow the “Dimming time (soft on/off)” parameter.

I have a similar issue but inverse… My zwave lights turn off immediately and the switch on the frontend reflects it correctly, however when I turn on a light (dimmer) the switch on the dashboard often turns on immediately but slider stays at 0%, then off, then the slider ramps up to 100% and the switch is on. The ramp rate of this HomeSeer WD200+ dimmer is set to 2s (default is 3s). The Qubino flush dimmers in the same room do not have this issue at all. I embedded a couple in two workshop style LED lights and they always work perfectly, unlike the HomeSeer dimmers.

I am not an expert on zwave innerworkings but I suspect the issue (in my case at least) has something to do with when a status update is sent. To clarify I will detail my setup:

When I turn on my office light, the other two lights mirror the settings of the office light. The other two lights turn on at the same time that the slider reaches 100%. Therefore, when I click the switch on the dashboard and the main light physically turns on, the other lights do not until the light being on is reflected on the dashboard by the sliders being at 100%.

In other words, the command to the device to turn on the main light is issued immediately but HA does not appear to receive a response stating - yes I am on at 100% - very fast. When it does, it reflects it on the dashboard and this is when the other lights turn on.

I just tried setting ramp rate to 0 and the issue persists. It may be a zwave traffic issue as well but then I would expect a delay with the main light physically turning on as well… the delay only happens when the light has to report back that it is indeed on and at 100% (by the time it does it).

Hopefully this adds to this thread, otherwise sorry for reviving it.

That’s normal and expected behavior for some devices. The UI has a timeout of 2 seconds, if there’s no state update it reverts. Some devices do not send a state update when changed via a Z-Wave command. When you turn a dimmer ON, the level is indeterminate. The driver will refresh the level value after 5 seconds. Since the 5 seconds is later than the UI timeout, you see the toggling issue. Changing the ramp rate (< 5 seconds) has no effect because the device doesn’t send an update anyways.

You can workaround it by setting a level value explicitly. The driver is optimistic in this case and sends a “fake” level update prior to the refresh. If you set the dimmer to 50%, the driver immediately tells HA the level value is 50%, and will poll for the actual value 5 seconds later. Same with the transition from On → Off, it sends an optimistic OFF value to HA immediately. If a device reports non-off states during a transition from Off to On, the UI will reflect that as well, meaning it will first show off, then might jump to different brightness levels until the device turns off. This can be a problem for some devices like shutters.

You can disable the optimistic updates using a driver configuration setting disableOptimisticValueUpdate, which might help with the On → Off transitions, but not Off → On. It does mean you’ll need to refresh all values manually. Changing the configuration is not possible with addons, you’ll need to run zwave-js or zwavejs2mqtt manually.

Hi, can you provide any guidance as to how I can get this UI? The slider and the switch would be neat! Thanks

@Mark.sydney - Below is the snapshot along with all the YAML needed to achieve it. However, what you are asking for specifically is just the ‘custom:slider-entity-row’ card. Install it first in HACS and then use it as shown below. The ‘card_mod’ section only make the otherwise huge card title a bit smaller and with less padding to waste less space… so you can omit that entirely.

type: entities
card_mod:
  style: |
    .card-header {
    font-size: 18px;
    padding: 2px 15px 2px 15px
    }
entities:
  - type: section
  - type: custom:slider-entity-row
    entity: light.living_room_light
    toggle: true
    name: Living Room
  - type: custom:slider-entity-row
    entity: fan.living_room_fan
    toggle: true
    name: Ceiling Fan
    state_color: true
title: Main Lights & Fans
state_color: true
1 Like

Thanks @aruffell

1 Like