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

@@ -34,7 +34,7 @@ import org.openhab.core.cache.ExpiringCache;
import org.openhab.core.io.net.http.HttpUtil;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.library.unit.SmartHomeUnits;
import org.openhab.core.library.unit.Units;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
@@ -225,8 +225,7 @@ public class MeterHandler extends BaseThingHandler {
ThingTypeUID thingtype = getThing().getThingTypeUID();
if (THING_TYPE_ENERGYMETER.equals(thingtype)) {
QuantityType<Energy> state = new QuantityType<>(meterState.getReadingValue(),
SmartHomeUnits.KILOWATT_HOUR);
QuantityType<Energy> state = new QuantityType<>(meterState.getReadingValue(), Units.KILOWATT_HOUR);
updateState(CHANNEL_LAST_READING_VALUE, state);
}