Examples of convertFromBinding()


Examples of org.openhab.binding.homematic.internal.converter.state.OpenClosedTypeConverter.convertFromBinding()

    Assert.assertEquals(OpenClosedType.CLOSED,
        converter.convertFromBinding(getDatapoint("STATE", false, 0, 0, "15", "HM-SCI-3-FM")));
    Assert.assertEquals(OpenClosedType.OPEN,
        converter.convertFromBinding(getDatapoint("STATE", true, 0, 0, "15", "HM-SCI-3-FM")));

    Assert.assertEquals(OpenClosedType.OPEN, converter.convertFromBinding(getDatapoint("STATE", false)));
    Assert.assertEquals(OpenClosedType.CLOSED, converter.convertFromBinding(getDatapoint("STATE", true)));

    Assert.assertEquals(OpenClosedType.CLOSED, converter.convertFromBinding(getDatapoint("LEVEL", true)));
    Assert.assertEquals(OpenClosedType.OPEN, converter.convertFromBinding(getDatapoint("LEVEL", false)));
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.OpenClosedTypeConverter.convertFromBinding()

        converter.convertFromBinding(getDatapoint("STATE", false, 0, 0, "15", "HM-SCI-3-FM")));
    Assert.assertEquals(OpenClosedType.OPEN,
        converter.convertFromBinding(getDatapoint("STATE", true, 0, 0, "15", "HM-SCI-3-FM")));

    Assert.assertEquals(OpenClosedType.OPEN, converter.convertFromBinding(getDatapoint("STATE", false)));
    Assert.assertEquals(OpenClosedType.CLOSED, converter.convertFromBinding(getDatapoint("STATE", true)));

    Assert.assertEquals(OpenClosedType.CLOSED, converter.convertFromBinding(getDatapoint("LEVEL", true)));
    Assert.assertEquals(OpenClosedType.OPEN, converter.convertFromBinding(getDatapoint("LEVEL", false)));

    Assert.assertEquals(OpenClosedType.OPEN, converter.convertFromBinding(getDatapoint("LEVEL", 1.0)));
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.PercentTypeConverter.convertFromBinding()

  }

  @Test
  public void testPercentTypeConverterFromBinding() throws Exception {
    PercentTypeConverter converter = new PercentTypeConverter();
    Assert.assertEquals(new PercentType(100), converter.convertFromBinding(getDatapoint("PRESS_SHORT", 1, 0, 1)));
    Assert.assertEquals(new PercentType(0), converter.convertFromBinding(getDatapoint("PRESS_SHORT", 0, 0, 1)));

    Assert.assertEquals(new PercentType(100), converter.convertFromBinding(getDatapoint("PRESS_SHORT", true, 0, 1)));
    Assert.assertEquals(new PercentType(100), converter.convertFromBinding(getDatapoint("PRESS_SHORT", true, 0, 5)));
    Assert.assertEquals(new PercentType(100),
View Full Code Here

Examples of org.openhab.binding.homematic.internal.converter.state.StringTypeConverter.convertFromBinding()

  @Test
  public void testValueListByString() throws Exception {
    StringTypeConverter converter = new StringTypeConverter();

    Assert.assertEquals(new StringType("0"),
        converter.convertFromBinding(getValueListVariable("0", "0;10;20;30;40;50")));
    Assert.assertEquals(new StringType("10"),
        converter.convertFromBinding(getValueListVariable("1", "0;10;20;30;40;50")));
    Assert.assertEquals(new StringType("50"),
        converter.convertFromBinding(getValueListVariable("5", "0;10;20;30;40;50")));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.