project Utilities / zepp_to_influxdb avatar

Utilities / zepp_to_influxdb: 8d205919




Rename the sleep/activity stage counters to specify which category they relate to (for utilities/zepp_to_influxdb#5)

Rename the sleep/activity stage counters to specify which category they relate to (for utilities/zepp_to_influxdb#5)

This moves both types from using field names of the form recorded_{type}_events to using one of

Commit 8d205919.

Authored 2023-08-05T14:56:11.000+01:00 by B Tasker in project Utilities / zepp_to_influxdb

+2 lines -2 lines

Commit Signature

Changes

diff --git a/app/mifit_to_influxdb.py b/app/mifit_to_influxdb.py
--- a/app/mifit_to_influxdb.py
+++ b/app/mifit_to_influxdb.py
# @@ -201,7 +201,7 @@ def extract_sleep_data(ts, slp, day):
#
# # Add a field for each of the recorded stages_counters
# for stage in stages_counters:
# - row['fields'][f"recorded_{stage}_events"] = stages_counters[stage]
# + row['fields'][f"recorded_sleep_{stage}_events"] = stages_counters[stage]
#
# # Add the record
# rows.append(row)
# @@ -315,7 +315,7 @@ def extract_step_data(ts, stp, day):
# "tags" : {}
# }
# for activity in activity_counters:
# - row['fields'][f"recorded_{activity}_events"] = activity_counters[activity]
# + row['fields'][f"recorded_activity_{activity}_events"] = activity_counters[activity]
# rows.append(row)
#
#
#