-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add gar_wg_state and gar_bp_state variables to Sync.py #153
Conversation
Error accessing variable 'gar_wg_state' when only using Withings blood pressure device. Moved set_lastsyn() under reach fit_data if statements so the other variable isn't used.. UnboundLocalError: cannot access local variable 'gar_wg_state' where it is not associated with a value
Oh, I see what's going on here. This most likely also explains the duplicate entries we see sometimes in the blood pressure stats.
|
Error accessing variable 'gar_wg_state' when only using Withings blood pressure device. Added variables to prevent this. UnboundLocalError: cannot access local variable 'gar_wg_state' where it is not associated with a value
@stynoo thanks, that is cleaner than my approach, and I can confirm it works when syncing only BP data. (I don't own the scale) |
withings_sync/sync.py
Outdated
@@ -470,6 +472,7 @@ def sync(): | |||
logging.info( | |||
"Fit file with blood pressure information uploaded to Garmin Connect" | |||
) | |||
# Save this sync so we don't re-download the same data again (if no range has been specified) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no longer need for this comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed, thanks!
Removed unneeded comment
lgtm! |
Error accessing variable 'gar_wg_state' when only using Withings blood pressure device. Moved set_lastsyn() under reach fit_data if statements so the other variable isn't used..
UnboundLocalError: cannot access local variable 'gar_wg_state' where it is not associated with a value