*/
@Override
public void handleEvent(ZWaveCommandClassValueEvent event, Item item, Map<String,String> arguments) {
ZWaveStateConverter<?,?> converter = this.getStateConverter(item, event.getValue());
String sensorType = arguments.get("sensor_type");
ZWaveBinarySensorValueEvent sensorEvent = (ZWaveBinarySensorValueEvent)event;
if (converter == null) {
logger.warn("No converter found for item = {}, node = {} endpoint = {}, ignoring event.", item.getName(), event.getNodeId(), event.getEndpoint());
return;
}
// Don't trigger event if this item is bound to another sensor type
if (sensorType != null && SensorType.getSensorType(Integer.parseInt(sensorType)) != sensorEvent.getSensorType())
return;
State state = converter.convertFromValueToState(event.getValue());
this.getEventPublisher().postUpdate(item.getName(), state);
}