February 18, 2019, 5:25pm
I’ve noticed that data read from the Health App using the search health data action does return data that differs from the numbers shown in the Health App.
It just reads the steps fro February 11th 2019 and groups all step data sets from the Health app by day.
For whatever reason it returns a list of two values: 13599 and 0
If I check the same day in the Health app I see: 8519 steps
Am I using the search Health data action wrong or is this a bug?
Thanks a lot in advance!
February 18, 2019, 5:55pm
Any chance you have multiple steps sources? E.g. An iPhone and an Apple Watch.
Shortcuts would retrieve both sets whereas health app will try and give you the actual steps based on both sources, accounting for any double counting.
You can filter in the Find action to just one source.
February 18, 2019, 5:56pm
For what it’s worth, your shortcut (and my own which is very similar) is working as expected for me. I can’t see what the issue might be.
February 18, 2019, 5:58pm
And as follow up, I don’t have a watch or a second source, so that would be consistent with
February 18, 2019, 6:10pm
Thank you! I guess that’s the reason at least for steps.
If I instead query the resting and activity-base energy expenditure I will also get different results.
I mean I have multiple activity sources, but they usually are not tracking simultaneously.
February 18, 2019, 6:14pm
“Usually” may be the key. Any level of overlap would skew the results unless explicitly accounted for.
February 18, 2019, 6:18pm
But according to the Health App for my resting energy expenditure there is only one source, my watch and even there the values queried via Shortcuts and the ones shown in the Health App differ. Not by much, but still.
Also there are some days the values are returned as “0”, despite the Health App clearly showing something.
February 18, 2019, 6:24pm
My numbers in shortcuts were also off compared with the Health app, until I changed “Source is NOT Frank’s iPhone” in “Find Health Samples Where”. For some reason this fixed it.
February 18, 2019, 6:58pm
Using start date picks up from a different point than the Health app.
Look at these resting energy related screenshots. Note the first entry on the 2nd & 3rd images from the health app are incorporating a reading from the 14th and the Shortcuts app starts with the first reading beginning on the 15th, not the first reading that overlaps with the 15th.
That could explain the discrepancies being observed. But you would have to examine the detail of your own data to be sure.
If there’s a data mismatch, with the same source data, it is either a rounding issue or a filtering issue.