From a2ca2c425cff275519037d44b852af833eacdfb9 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Wed, 14 Oct 2026 14:49:06 -0500 Subject: [PATCH] Report the paired sensor's model and send status updates The device model was always "Libre 3", so Libre 3 Plus sensors were mislabeled. It now uses the sensor model captured at pairing. Status updates were only sent to status observers, so Loop never heard about status changes after setup. setState now also sends the current status to the delegate. --- LibreLoop/LibreLoopCGMManager/LibreLoopCGMManager.swift | 4 ++-- LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LibreLoop/LibreLoopCGMManager/LibreLoopCGMManager.swift b/LibreLoop/LibreLoopCGMManager/LibreLoopCGMManager.swift index ee8793d..1c5f42f 100644 --- a/LibreLoop/LibreLoopCGMManager/LibreLoopCGMManager.swift +++ b/LibreLoop/LibreLoopCGMManager/LibreLoopCGMManager.swift @@ -425,9 +425,9 @@ public final class LibreLoopCGMManager: CGMManager { } public var device: HKDevice? { - HKDevice(name: "FreeStyle Libre 3", + HKDevice(name: "FreeStyle \(state.sensorModel ?? "Libre 3")", manufacturer: "Abbott", - model: "Libre 3", + model: state.sensorModel, hardwareVersion: nil, firmwareVersion: state.firmwareVersion, softwareVersion: nil, diff --git a/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift b/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift index 6aa8405..cd8cbbc 100644 --- a/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift +++ b/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift @@ -1151,6 +1151,7 @@ extension LibreLoopCGMManager { delegateQueue?.async { [weak self] in guard let self else { return } self.cgmManagerDelegate?.cgmManagerDidUpdateState(self) + self.cgmManagerDelegate?.cgmManager(self, didUpdate: self.cgmManagerStatus) } notifyStateObservers() }