diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java index 9166f5b92..2a43a815e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java @@ -73,7 +73,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator { @Override public GBDevice createDevice(GBDeviceCandidate candidate) { - return new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), null, getDeviceType()); + GBDevice gbDevice = new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), null, getDeviceType()); + for (BatteryConfig batteryConfig : getBatteryConfig()) { + gbDevice.setBatteryIcon(batteryConfig.getBatteryIcon(), batteryConfig.getBatteryIndex()); + gbDevice.setBatteryLabel(batteryConfig.getBatteryLabel(), batteryConfig.getBatteryIndex()); + } + return gbDevice; } @Override