Use core unit classes (#9261)
Add-ons should not depend on tec.uom.se classes but use core unit classes instead so they are less impacted when this library is replaced or upgraded. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -12,14 +12,7 @@
|
||||
*/
|
||||
package org.openhab.binding.sensibo.internal.handler;
|
||||
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_CURRENT_HUMIDITY;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_CURRENT_TEMPERATURE;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_FAN_LEVEL;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_MASTER_SWITCH;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_MODE;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_SWING_MODE;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_TARGET_TEMPERATURE;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.CHANNEL_TIMER;
|
||||
import static org.openhab.binding.sensibo.internal.SensiboBindingConstants.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -55,6 +48,7 @@ import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.library.unit.SIUnits;
|
||||
import org.openhab.core.library.unit.SmartHomeUnits;
|
||||
import org.openhab.core.thing.Channel;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@@ -75,8 +69,6 @@ import org.openhab.core.types.UnDefType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import tec.uom.se.unit.Units;
|
||||
|
||||
/**
|
||||
* The {@link SensiboSkyHandler} is responsible for handling commands, which are
|
||||
* sent to one of the channels.
|
||||
@@ -300,7 +292,7 @@ public class SensiboSkyHandler extends SensiboBaseThingHandler implements Channe
|
||||
|
||||
private void handleCurrentHumidityCommand(ChannelUID channelUID, Command command, SensiboSky sensiboSky) {
|
||||
if (command instanceof RefreshType) {
|
||||
updateState(channelUID, new QuantityType<>(sensiboSky.getHumidity(), Units.PERCENT));
|
||||
updateState(channelUID, new QuantityType<>(sensiboSky.getHumidity(), SmartHomeUnits.PERCENT));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user