Z-Wave Configuration refresh_value - What exactly should this be?

I have seen a number of threads regarding the config for z-wave configuration and specifically when it comes to the GE dimmer switches and the lag of flipping within the front end. I am even wrestling with this same issue and tried adding various setups to conquer it. There is one setting that seems to be a little confusing, the refresh_value. What exactly should this be set to? I see some have it set to “refresh_value: true” while others have it set to “refresh_value: 2” (or some other number). I realize the documentation suggests it should be refresh_value: true (default false) but is this right? If it should be “true” based on the specs what is actually happening for those of us that are using a number, is it just defaulting to “false”?

I actually have mine set to “refresh_value: 2”. I set it up awhile ago based on a suggestion to use a number and have seen differences ever since.

Here is a recent example of someone using a number -> Zwave light doesn't turn off in frontend on first try
Here is one using true -> GE wall switch on/off vs toggle

Can anyone definitively say what this value should be?

Thx

1 Like

Yes, curious as well.

The way I read the documentation:

  • refresh_value is a boolean that specifies whether or not HA should “refresh” the device after you take an action with it.
  • delay is how long HA should wait to refresh if refresh_value is set to true

I believe this to help with devices that take a while to complete their actions. For example, the GE dimmers. When you click the “off” side of the switch it take a second or two for the light to fade to off. If HA doesn’t wait long enough, HA will get the status of the switch “mid fade” and will not update to show that the switch is now completely off.

This happens because the GE switches do not send out their state when you push them. Due to a patent (recently expired) regarding ‘instant updates’, the switches merely send out a “broadcast” message when manually touched, which the controller then takes as a cue to turn around and ask the switch what it’s status is.

1 Like

From the source code refresh_value is boolean (true or false), delay is an integer of seconds to delay refreshing.

In Python 2 is “truthy”, so its the same as setting it to True, if you don’t set the delay you get the default of 5 seconds.

DEVICE_CONFIG_SCHEMA_ENTRY = vol.Schema({
vol.Optional(CONF_POLLING_INTENSITY): cv.positive_int,
vol.Optional(CONF_IGNORED, default=DEFAULT_CONF_IGNORED): cv.boolean,
vol.Optional(CONF_INVERT_OPENCLOSE_BUTTONS,
             default=DEFAULT_CONF_INVERT_OPENCLOSE_BUTTONS): cv.boolean,
vol.Optional(CONF_REFRESH_VALUE, default=DEFAULT_CONF_REFRESH_VALUE):
    cv.boolean,
vol.Optional(CONF_REFRESH_DELAY, default=DEFAULT_CONF_REFRESH_DELAY):
    cv.positive_int

})

1 Like