Use renamed Units class (#9267)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-12-07 10:34:02 +01:00
committed by GitHub
parent d0480d0f2e
commit ac6f08908f
208 changed files with 1087 additions and 1169 deletions

View File

@@ -22,7 +22,7 @@ import org.openhab.binding.paradoxalarm.internal.model.ParadoxPanel;
import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.library.unit.SmartHomeUnits;
import org.openhab.core.library.unit.Units;
import org.openhab.core.thing.Thing;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,12 +62,10 @@ public class ParadoxPanelHandler extends EntityBaseHandler {
updateProperty(PANEL_BOOTLOADER_VERSION_PROPERTY_NAME, panelInformation.getBootLoaderVersion().toString());
updateState(PANEL_TIME, new DateTimeType(panel.getPanelTime()));
updateState(PANEL_INPUT_VOLTAGE,
new QuantityType<ElectricPotential>(panel.getVdcLevel(), SmartHomeUnits.VOLT));
updateState(PANEL_BOARD_VOLTAGE,
new QuantityType<ElectricPotential>(panel.getDcLevel(), SmartHomeUnits.VOLT));
updateState(PANEL_INPUT_VOLTAGE, new QuantityType<ElectricPotential>(panel.getVdcLevel(), Units.VOLT));
updateState(PANEL_BOARD_VOLTAGE, new QuantityType<ElectricPotential>(panel.getDcLevel(), Units.VOLT));
updateState(PANEL_BATTERY_VOLTAGE,
new QuantityType<ElectricPotential>(panel.getBatteryLevel(), SmartHomeUnits.VOLT));
new QuantityType<ElectricPotential>(panel.getBatteryLevel(), Units.VOLT));
}
}
}