Use renamed Units class (#9267)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -26,7 +26,7 @@ import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.OpenClosedType;
|
||||
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.Channel;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@@ -93,9 +93,9 @@ public class MillheatHeaterHandler extends MillheatBaseThingHandler {
|
||||
if (command instanceof RefreshType) {
|
||||
if (config.power != null) {
|
||||
if (heater.isHeatingActive()) {
|
||||
updateState(channelUID, new QuantityType<>(config.power, SmartHomeUnits.WATT));
|
||||
updateState(channelUID, new QuantityType<>(config.power, Units.WATT));
|
||||
} else {
|
||||
updateState(channelUID, new QuantityType<>(0, SmartHomeUnits.WATT));
|
||||
updateState(channelUID, new QuantityType<>(0, Units.WATT));
|
||||
}
|
||||
} else {
|
||||
updateState(channelUID, UnDefType.UNDEF);
|
||||
|
||||
Reference in New Issue
Block a user