Skip to content

Commit fcc8054

Browse files
authored
Recognize SEB-Scale in QNHandler (#1342)
Co-authored-by: ranchoiver <263007155+ranchoiver@users.noreply.github.com>
1 parent 070b7de commit fcc8054

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

  • android_app/app/src/main/java/com/health/openscale/core/bluetooth/scales

android_app/app/src/main/java/com/health/openscale/core/bluetooth/scales/QNHandler.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,15 @@ class QNHandler : ScaleDeviceHandler() {
8585
val uuids = device.serviceUuids.toSet()
8686

8787
val hasQN = uuids.contains(uuid16(0xFFE0)) || uuids.contains(uuid16(0xFFF0))
88-
val nameIsQn = nameLc.contains("qn-scale") || nameLc.contains("renpho-scale")
89-
90-
// Require BOTH: QN services AND QN-typical name,
91-
if (!((hasQN && nameIsQn))) return null
88+
val nameIsQnFamily =
89+
nameLc.contains("qn-scale") ||
90+
nameLc.contains("renpho-scale") ||
91+
// SEB/Tefal Goodvibes variants advertise under SEB branding
92+
// while keeping the QN/Yolanda service layout.
93+
nameLc.contains("seb-scale")
94+
95+
// Require BOTH: QN services AND a QN-family name hint.
96+
if (!(hasQN && nameIsQnFamily)) return null
9297

9398
likelyUseType1 = uuids.contains(uuid16(0xFFE0)) && !uuids.contains(uuid16(0xFFF0))
9499

0 commit comments

Comments
 (0)