diff --git a/bundles/org.openhab.binding.coronastats/src/main/java/org/openhab/binding/coronastats/internal/dto/CoronaStatsCases.java b/bundles/org.openhab.binding.coronastats/src/main/java/org/openhab/binding/coronastats/internal/dto/CoronaStatsCases.java index 2a5fd8a12e4f6..33ecbf70d13ad 100644 --- a/bundles/org.openhab.binding.coronastats/src/main/java/org/openhab/binding/coronastats/internal/dto/CoronaStatsCases.java +++ b/bundles/org.openhab.binding.coronastats/src/main/java/org/openhab/binding/coronastats/internal/dto/CoronaStatsCases.java @@ -17,11 +17,15 @@ import java.util.HashMap; import java.util.Map; +import javax.measure.quantity.Dimensionless; + import org.eclipse.jdt.annotation.NonNullByDefault; -import org.eclipse.smarthome.core.library.types.DecimalType; +import org.eclipse.smarthome.core.library.types.QuantityType; import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.UnDefType; +import tec.uom.se.AbstractUnit; + /** * The {@link CoronaStatsCountry} class holds the internal data representation of each Country * @@ -55,7 +59,7 @@ protected State parseToState(int count) { if (count == -1) { return UnDefType.NULL; } else { - return new DecimalType(count); + return new QuantityType(count, AbstractUnit.ONE); } } } diff --git a/bundles/org.openhab.binding.coronastats/src/main/resources/ESH-INF/thing/channel-type.xml b/bundles/org.openhab.binding.coronastats/src/main/resources/ESH-INF/thing/channel-type.xml index cad00e91c2b66..5de439d666be6 100644 --- a/bundles/org.openhab.binding.coronastats/src/main/resources/ESH-INF/thing/channel-type.xml +++ b/bundles/org.openhab.binding.coronastats/src/main/resources/ESH-INF/thing/channel-type.xml @@ -5,49 +5,49 @@ xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd"> - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless - Number + Number:Dimensionless