Skip to content

Commit

Permalink
fix: Wrong last glucose level mmol/l #62 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedy89 authored Feb 16, 2024
1 parent 8dfee4f commit 5bad17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/carelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def _async_update_data(self):
if current_sg:
date_time_local = convert_date_to_isodate(current_sg["datetime"])
data[SENSOR_KEY_LASTSG_TIMESTAMP] = date_time_local.replace(tzinfo=timezone)
data[SENSOR_KEY_LASTSG_MMOL] = float(round(current_sg["sg"] * 0.555, 2))
data[SENSOR_KEY_LASTSG_MMOL] = float(round(current_sg["sg"] * 0.0555, 2))
data[SENSOR_KEY_LASTSG_MGDL] = current_sg["sg"]
if prev_sg:
data[SENSOR_KEY_SG_DELTA] = (float(current_sg["sg"]) - float(prev_sg["sg"]))
Expand Down

0 comments on commit 5bad17e

Please sign in to comment.