protected ZWaveStateConverter<?,?> getStateConverter(Item item, Object value) {
if(item == null)
return null;
List<Class<? extends State>> list = new ArrayList<Class<? extends State>>(item.getAcceptedDataTypes());
Collections.sort(list, new StateComparator());
for (Class<? extends State> stateClass : list) {
ZWaveStateConverter<?,?> result = stateConverters.get(stateClass);
if (result == null || !result.getType().isInstance(value))