[iaqualink] Fix isssue using manual pool IDs (#12659)

Fixes #12654

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
Dan Cunningham 2022-04-27 07:08:57 -07:00 committed by GitHub
parent 5f172c1557
commit c48ba25915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,7 +296,7 @@ public class IAqualinkHandler extends BaseThingHandler {
}
if (confSerialId != null && !confSerialId.isBlank()) {
serialNumber = confSerialId.replaceAll("[^a-zA-Z0-9]", "").toLowerCase();
serialNumber = confSerialId.replaceAll("[^a-zA-Z0-9]", "").toUpperCase();
if (!Arrays.stream(devices).anyMatch(device -> device.getSerialNumber().equals(serialNumber))) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"No Device for given serialId found");
@ -306,6 +306,8 @@ public class IAqualinkHandler extends BaseThingHandler {
serialNumber = devices[0].getSerialNumber();
}
logger.debug("Using serial number {}", serialNumber);
initPolling(COMMAND_REFRESH_SECONDS);
} catch (IOException e) {
logger.debug("Could not connect to service {}", e.getMessage());