burnedikt / diasend-nightscout-bridge

Synchronize your diasend data to nightscout.
MIT License
18 stars 18 forks source link

feat: allow specifying mmol/l or mg/dl as glucose unit #3

Closed burnedikt closed 2 years ago

burnedikt commented 2 years ago

Adds support for different types of units for glucose values (mg/dl and mmol/l). Addresses #2

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 0.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

boethius commented 2 years ago

@burnedikt thanks for this, I tested this and specifying "mmol/l" does not work. Perhaps the diasend API doesn't accept it, or maybe the unit is differently typed such as mmoll or mmol. However, "mg/dl" is converted successfully to mmol/l when I changed this back.

burnedikt commented 2 years ago

@boethius thanks for testing. You were right in that it didn't correctly work on the nightscout side. Sorry, I should've tested more thoroughly. Eventually, I found out that nightscout currently always expects the value to be in mg/dl and then converts it accordingly, depending on what DISPLAY_UNITS is configured.

So I ended up removing the support for mmol/l in this library again as it doesn't really help. Diasend can still return the values in mmol/l but nightscout can't handle it. Reference: https://github.com/burnedikt/diasend-nightscout-bridge/commit/625748780f6b68f17152c47f4bbd73fa9a43f1fc