/**
   * Handles an incoming {@link ZWaveCommandClassValueEvent}. Implement this message in derived
   * classes to convert the value and post an update on the openHAB bus.
   *
   * @param provider the {@link ZWaveBindingProvider} that provides the item
   * @param itemName the name of the item that will receive the event.
   * @param event the received {@link ZWaveCommandClassValueEvent}.
   */
  public void handleEvent(
      ZWaveBindingProvider provider, String itemName, ZWaveCommandClassValueEvent event) {
    ZWaveBindingConfig bindingConfiguration = provider.getZwaveBindingConfig(itemName);
    Item item = provider.getItem(itemName);
    String commandClassName = bindingConfiguration.getArguments().get("command");
    boolean respondToBasic =
        "true".equalsIgnoreCase(bindingConfiguration.getArguments().get("respond_to_basic"));

    logger.trace(
        "Getting converter for item = {}, command class = {}, item command class = {}",
        itemName,
        event.getCommandClass().getLabel(),
        commandClassName);

    if (item == null) return;

    // check whether this item is bound to the right command class.

    if (commandClassName != null
        && !commandClassName.equalsIgnoreCase(event.getCommandClass().getLabel().toLowerCase())
        && !(respondToBasic && event.getCommandClass() == CommandClass.BASIC)) return;

    ZWaveCommandClassConverter<?> converter = this.getConverter(event.getCommandClass());

    if (converter == null) {
      logger.warn(
          "No converter found for command class = {}, ignoring event.",
          event.getCommandClass().toString());
      return;
    }

    converter.handleEvent(event, item, bindingConfiguration.getArguments());
  }