protected DigitalSTROMBindingConfig parseBindingConfigString( String context, Item item, String bindingConfig) throws BindingConfigParseException { DigitalSTROMBindingConfig configItem = new DigitalSTROMBindingConfig(); configItem.init(item, bindingConfig); if (!configItem.isValid()) { throw new BindingConfigParseException( "itemType mismatch ... wrong item:" + item.getName() + " for digitalstrom hardware"); } return configItem; }
@Override public List<DigitalSTROMBindingConfig> getAllDeviceConsumptionItems() { List<DigitalSTROMBindingConfig> deviceConsumptionItems = new ArrayList<DigitalSTROMBindingConfig>(); for (BindingConfig bindingConf : bindingConfigs.values()) { DigitalSTROMBindingConfig digitalSTROM2BindingConf = (DigitalSTROMBindingConfig) bindingConf; if (digitalSTROM2BindingConf.isValidDeviceMeterItem()) { deviceConsumptionItems.add(digitalSTROM2BindingConf); } } return deviceConsumptionItems; }