Examples of ZWaveBatteryCommandClass


Examples of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveBatteryCommandClass

        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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.