From 78a6bc289f9c4bfa5f3e26de08fa396ae2185798 Mon Sep 17 00:00:00 2001 From: Tim Vermeulen Date: Wed, 8 Feb 2023 22:04:25 +0100 Subject: [PATCH] Fix typo that overwrites active insulin data (#18) --- custom_components/carelink/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/carelink/__init__.py b/custom_components/carelink/__init__.py index f4e68f4..2db0102 100644 --- a/custom_components/carelink/__init__.py +++ b/custom_components/carelink/__init__.py @@ -218,8 +218,8 @@ async def _async_update_data(self): data[SENSOR_KEY_LAST_ALARM] = date_time_local.replace(tzinfo=timezone) data[SENSOR_KEY_LAST_ALARM_ATTRS] = last_alarm else: - data[SENSOR_KEY_ACTIVE_INSULIN] = None - data[SENSOR_KEY_ACTIVE_INSULIN_ATTRS] = {} + data[SENSOR_KEY_LAST_ALARM] = None + data[SENSOR_KEY_LAST_ALARM_ATTRS] = {} if ( recent_data["basal"] is not None