Usage Question (Z-Wave): What exactly does "refresh" do?

Hi @harobinson

The refresh is a capability that has a single command, called refresh, and has no attributes.

For zigbee, when you run the devie:refresh() function or swipe down in the details view:

  • If you have not made a custom zigbee_handler for it and use the default handlers, then execute a read of all the capabilities attributes of the device profile, which are registered in the driver or subdriver template.
  • If you have made a custom zigbee_handler, then execute the code what you have written in that handler.

For Zwave it is the same, but the equivalent function is device:default_refresh().

  • If you have not made a custom zwave_handler for it and use the default handlers, then send a Get command for all the Command Class of the capabilities of the device profile and that are registered in the template
  • If you have made a custom zwave_handler, then execute the code what you have written in that handler.

When the device responds to the reading of the attributes or Command Class it will cause the device profile capabilities to be updated

If are devices with battery, that sleep between the configured attributes reporting intervals or wake_up interval configuration, they do not respond to the attribute or command class readings of a refresh command

1 Like