*/
@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");
ZWaveAlarmSensorValueEvent alarmEvent = (ZWaveAlarmSensorValueEvent)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 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);
}