[wemo] Add dimensions for power/energy channel types for Insight Switch. (#11208)
* Add dimensions for power/energy channel types for Insight Switch. Fixes #11207 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
@@ -25,6 +25,8 @@ import org.openhab.binding.wemo.internal.handler.WemoHandler;
|
||||
import org.openhab.binding.wemo.internal.http.WemoHttpCall;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
import org.openhab.core.thing.ThingStatusDetail;
|
||||
@@ -122,7 +124,7 @@ public class WemoHandlerTest {
|
||||
@Test
|
||||
public void assertThatChannelAVERAGEPOWERIsUpdatedOnReceivedValue() {
|
||||
insightParams.avgPower = POWER_PARAM;
|
||||
State expectedStateType = new DecimalType(POWER_PARAM);
|
||||
State expectedStateType = new QuantityType<>(POWER_PARAM, Units.WATT);
|
||||
String expectedChannel = CHANNEL_AVERAGEPOWER;
|
||||
|
||||
testOnValueReceived(expectedChannel, expectedStateType, insightParams.toString());
|
||||
|
||||
Reference in New Issue
Block a user