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

@@ -39,7 +39,7 @@ import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
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.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
@@ -388,7 +388,7 @@ public class WLedHandler extends BaseThingHandler {
break;
case CHANNEL_PRESET_DURATION:
if (command instanceof QuantityType) {
QuantityType<?> seconds = ((QuantityType<?>) command).toUnit(SmartHomeUnits.SECOND);
QuantityType<?> seconds = ((QuantityType<?>) command).toUnit(Units.SECOND);
if (seconds != null) {
bigTemp = new BigDecimal(seconds.intValue()).multiply(new BigDecimal(1000));
sendGetRequest("/win&PT=" + bigTemp.intValue());
@@ -397,7 +397,7 @@ public class WLedHandler extends BaseThingHandler {
break;
case CHANNEL_TRANS_TIME:
if (command instanceof QuantityType) {
QuantityType<?> seconds = ((QuantityType<?>) command).toUnit(SmartHomeUnits.SECOND);
QuantityType<?> seconds = ((QuantityType<?>) command).toUnit(Units.SECOND);
if (seconds != null) {
bigTemp = new BigDecimal(seconds.intValue()).multiply(new BigDecimal(1000));
sendGetRequest("/win&TT=" + bigTemp.intValue());