private void onModuleAddedInternal(NAModule naModule) { ThingUID thingUID = findThingUID(naModule.getType(), naModule.getId()); Map<String, Object> properties = new HashMap<>(2); properties.put(EQUIPMENT_ID, naModule.getId()); properties.put(PARENT_ID, naModule.getMainDevice()); addDiscoveredThing(thingUID, properties, naModule.getModuleName()); }
@Override protected void updateChannels() { try { NADeviceListBody deviceList = bridgeHandler.getStationApi().devicelist(actualApp, getParentId(), false).getBody(); for (NAModule module : deviceList.getModules()) { if (module.getId().equalsIgnoreCase(getId())) { this.module = module; super.updateChannels(); } } } catch (Exception e) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, e.getMessage()); } }