Use renamed Units class (#9267)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user