record = new OpenHABConfigurationRecord(domain, "Routing", "Routing", true);
record.value = Boolean.toString(node.isRouting());
records.add(record);
record = new OpenHABConfigurationRecord(domain, "Power", "Power", true);
ZWaveBatteryCommandClass batteryCommandClass = (ZWaveBatteryCommandClass) node
.getCommandClass(CommandClass.BATTERY);
if (batteryCommandClass != null) {
if(batteryCommandClass.getBatteryLevel() == null) {
record.value = "BATTERY " + "UNKNOWN";
}
else {
record.value = "BATTERY " + batteryCommandClass.getBatteryLevel() + "%";
}
} else {
record.value = "MAINS";
}
records.add(record);