this.pollingJob = null;
}
miIoScheduler.schedule(() -> {
- ThingBuilder thingBuilder = editThing();
- thingBuilder.withLabel(miDevice.getDescription());
- updateThing(thingBuilder.build());
+ String label = getThing().getLabel();
+ if (label == null || label.startsWith("Xiaomi Mi Device")) {
+ ThingBuilder thingBuilder = editThing();
+ thingBuilder.withLabel(miDevice.getDescription());
+ updateThing(thingBuilder.build());
+ }
logger.info("Mi Device model {} identified as: {}. Does not match thingtype {}. Changing thingtype to {}",
modelId, miDevice.toString(), getThing().getThingTypeUID().toString(),
miDevice.getThingType().toString());