Package org.openhab.binding.nikobus.internal.config

Examples of org.openhab.binding.nikobus.internal.config.Button


      Button.PressType type, String address, String[] groups)
      throws BindingConfigParseException {

    Item item = new SwitchItem(name);
    provider.processBindingConfiguration("context", item, config);
    Button button = (Button) provider.getItemConfig(name);

    assertEquals(name, button.getName());
    assertEquals(address, button.getAddress());
    assertEquals(type, button.getType());

    String[] modules = (String[]) Whitebox.getInternalState(button,
        "impactedModules");

    assertEquals(groups.length, modules.length);
View Full Code Here


  private void parseButton(String name, String config, Button.PressType type,
      String address) throws BindingConfigParseException {

    Item item = new SwitchItem(name);
    provider.processBindingConfiguration("context", item, config);
    Button button = (Button) provider.getItemConfig(name);

    assertEquals(name, button.getName());
    assertEquals(address, button.getAddress());
    assertEquals(type, button.getType());
  }
View Full Code Here

    if (config == null || config.trim().length() == 0) {
      throw new BindingConfigParseException("Invalid config for item " + item.getName());
    }

    if (config.matches(BUTTON_CONFIG_PATTERN)) {
      return new Button(item.getName(), config);
    }

    if (config.matches(MODULE_CHANNEL_PATTERN)) {
      String address = config.split(":")[0];
      int channelNum = Integer.parseInt(config.split(":")[1]);
View Full Code Here

TOP

Related Classes of org.openhab.binding.nikobus.internal.config.Button

Copyright © 2018 www.massapicom. 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.