Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Strange value from userActivity.goals.calories

ANSWERED

I need my calories goal for my watchface and I tried to call it with userActivity.goals.calories.

 

I always get the value 25377, but (in my case) it should be 3029. The other values (distance, steps, elevationGain, active Minutes) from userActivity.goals are correct.

 

Where is my mistake? Any ideas?

 

Thans in advance!

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Sorry, the fix didn't make it into the build, but it's definitely in the next one.

View best answer in original post

Best Answer
0 Votes
10 REPLIES 10

Is the goal definitely configured in your account, and have you done a sync since setting it?

Best Answer
0 Votes
Thanks for your reply! Yes, the value is set to 3029 in my account and I
have definitely synced several times after setting it.
Best Answer
0 Votes

I see similar behavior. My goal is set to 2500 (and synced):

 

 var goal = userActivity.goals["calories"]
  console.log("cals " + goal)

[5:38:08 PM]cals 19789

 

I sync'd it to 3029 and see this:

 

[5:58:10 PM]cals 23976

 

 

Best Answer
0 Votes

I was just trying to implement a goal setting on my watchface and encountered this also.

 

After some experimenting I found that dividing the goal by 8.8776 and rounding to the nearest whole number solved the issue for me.

 

I'm not sure where 8.8776 comes from...

 

In your case, it looks like 7.1955 would be what you would use.  Something whacky is definitely going on.

Best Answer
0 Votes

Any news on this???

 

IMHO, this must be somehow related to my code, since the goals are handled correctly in the original Fitbit watchfaces, but not in my watchface.

 

My code is available at https://gitlab.com/private-software/fitbit-clearbeam-watchface/

Best Answer
0 Votes

I am getting the same issue. My goal via phone is 3140; my watch thinks it's 21,287.

Also it thinks my goal is 100 floors!

Best Answer
0 Votes

Some of the goals are being returned with the wrong unit type, it's fixed in the forthcoming update.

Best Answer

Great! I've commented my bodged fixes and will revise once they are fixed on your end!

Best Answer
0 Votes

I've updated to the latest version, but this issue is still present.

What are the submitted unit types? I thought it could be kJ instead of kcal for the calories, but the conversion is not correct. In my case:

3029 [kcal] x 4,184 [kJ/kcal]= 12673,3 [kJ] and not 25377 [whatever?]...

 

My elevation goal is 10, but the device gives 100.

 

In consideration of publishing our watchfaces, this is quite dissatisfying... 

Best Answer
0 Votes

Sorry, the fix didn't make it into the build, but it's definitely in the next one.

Best Answer
0 Votes