Skip to content

Commit

Permalink
Level Unknown added to sleep_level_mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
arpanghosh8453 committed Mar 31, 2024
1 parent 555dd2f commit eba14ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Fitbit_Fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def get_daily_data_limit_100d(start_date_str, end_date_str):
}
})

sleep_level_mapping = {'wake': 3, 'rem': 2, 'light': 1, 'deep': 0, 'asleep': 1, 'restless': 2, 'awake': 3}
sleep_level_mapping = {'wake': 3, 'rem': 2, 'light': 1, 'deep': 0, 'asleep': 1, 'restless': 2, 'awake': 3, 'unknown': 4}
for sleep_stage in record['levels']['data']:
log_time = datetime.fromisoformat(sleep_stage["dateTime"])
utc_time = LOCAL_TIMEZONE.localize(log_time).astimezone(pytz.utc).isoformat()
Expand Down

0 comments on commit eba14ce

Please sign in to comment.