*/
@Override
public void handleEvent(ZWaveCommandClassValueEvent event, Item item, Map<String,String> arguments) {
ZWaveStateConverter<?,?> converter = this.getStateConverter(item, event.getValue());
String alarmType = arguments.get("alarm_type");
ZWaveAlarmValueEvent alarmEvent = (ZWaveAlarmValueEvent)event;
if (converter == null) {
logger.warn("NODE {}: No converter found for item = {}, endpoint = {}, ignoring event.", event.getNodeId(), item.getName(), event.getEndpoint());
return;
}
// Don't trigger event if this item is bound to another alarm type
if (alarmType != null && AlarmType.getAlarmType(Integer.parseInt(alarmType)) != alarmEvent.getAlarmType())
return;
State state = converter.convertFromValueToState(event.getValue());
this.getEventPublisher().postUpdate(item.getName(), state);
}