Examples of NumberItem


Examples of org.openhab.core.library.items.NumberItem

  public GenericItem createItem(String itemTypeName, String itemName) {
    if (itemTypeName.equals(ITEM_TYPES[0])) return new SwitchItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[1])) return new RollershutterItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[2])) return new ContactItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[3])) return new StringItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[4])) return new NumberItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[5])) return new DimmerItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[6])) return new DateTimeItem(itemName);
    if (itemTypeName.equals(ITEM_TYPES[7])) return new ColorItem(itemName);
    else return null;
  }
View Full Code Here

Examples of org.openhab.core.library.items.NumberItem

          Command command = null;
          if(commandAsString == null) {
            // for those configuration strings that are not really linked to a openHAB command we
            // create a dummy Command to be able to store the configuration information
            // I have choosen to do that with NumberItems
            NumberItem dummy = new NumberItem(Integer.toString(counter));
            command = createCommandFromString(dummy,Integer.toString(counter));
            counter++;
            config.put(command, newElement);           
          } else {
            command = createCommandFromString(item, commandAsString);
View Full Code Here

Examples of org.openhab.core.library.items.NumberItem

        Command command = null;
        if(commandAsString == null) {
          // for those configuration strings that are not really linked to a openHAB command we
          // create a dummy Command to be able to store the configuration information
          // I have choosen to do that with NumberItems
          NumberItem dummy = new NumberItem(Integer.toString(counter));
          command = createCommandFromString(dummy,Integer.toString(counter));
          counter++;
        } else {
          command = createCommandFromString(item, commandAsString);
        }
View Full Code Here

Examples of org.openhab.core.library.items.NumberItem

    final NetatmoBinding binding = new NetatmoBinding();
    binding.updated(config);

    final NetatmoGenericBindingProvider provider = new NetatmoGenericBindingProvider();
    provider.processBindingConfiguration("netatmo.items", new NumberItem(
        "Netatmo_OfficeInParis_Bosssoffice_Temperature"),
        "70:ee:50:00:02:20#Temperature");
    provider.processBindingConfiguration("netatmo.items", new NumberItem(
        "Netatmo_OfficeInParis_NetatmoHQ_Temperature"),
        "70:ee:50:00:02:20#02:00:00:00:02:a0#Temperature");
    provider.processBindingConfiguration("netatmo.items", new NumberItem(
        "Netatmo_OfficeInParis_NetatmoHQ_Humidity"),
        "70:ee:50:00:02:20#02:00:00:00:02:a0#Humidity");
    binding.addBindingProvider(provider);

    binding.execute();
View Full Code Here

Examples of org.openhab.core.library.items.NumberItem

                Command command = null;
                if(commandAsString == null) {
                        // for those configuration strings that are not really linked to a openHAB command we
                        // create a dummy Command to be able to store the configuration information
                        // I have choosen to do that with NumberItems
                        NumberItem dummy = new NumberItem(Integer.toString(counter));
                        command = createCommandFromString(dummy,Integer.toString(counter));
                        counter++;
                        config.put(command, newElement);                                               
                } else {
                        command = createCommandFromString(item, commandAsString);
View Full Code Here

Examples of org.openhab.core.library.items.NumberItem

    @Test
    public void testReceiveTempertureUpdate() {
        parameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.TEMPERATURE);
        provider.setParameterAddress(parameterAddress);
        binding.addBindingProvider(provider);
        provider.setItem(new NumberItem("dummie"));
        BigDecimal temperature = new BigDecimal("20.3");
        binding.valueChanged(parameterAddress, new NumberWithUnit(Unit.DEGREE_CELSIUS, temperature));
        assertEquals("Update State", new DecimalType(temperature), publisher.getUpdateState());
    }
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.