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:
@@ -21,11 +21,10 @@ import javax.measure.quantity.Dimensionless;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.SmartHomeUnits;
|
||||
import org.openhab.core.types.State;
|
||||
import org.openhab.core.types.UnDefType;
|
||||
|
||||
import tec.uom.se.AbstractUnit;
|
||||
|
||||
/**
|
||||
* The {@link CoronaStatsCountry} class holds the internal data representation of each Country
|
||||
*
|
||||
@@ -59,7 +58,7 @@ public class CoronaStatsCases {
|
||||
if (count == -1) {
|
||||
return UnDefType.NULL;
|
||||
} else {
|
||||
return new QuantityType<Dimensionless>(count, AbstractUnit.ONE);
|
||||
return new QuantityType<Dimensionless>(count, SmartHomeUnits.ONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user