Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Power Unit ? #126

Open
nemoneph opened this issue Jan 17, 2025 · 0 comments
Open

Missing Power Unit ? #126

nemoneph opened this issue Jan 17, 2025 · 0 comments

Comments

@nemoneph
Copy link

Thanks for this great plugin.

I try to write Cycling Power to Apple Health:

https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower

I have a problem with the Unit :

PowerUnit => https://developer.apple.com/documentation/healthkit/hkunit/3929735-watt
(NotPresent here
https://developer.apple.com/documentation/healthkit/hkunit/1615733-init )

I don't see any reference in this plugin, I tried many things, but it's crash due to the missing unit.

  const powerSamples = data.locations.w.map((power, index) => ({
              quantityType: HKQuantityTypeIdentifier.cyclingPower,
              unit: '', // WHAT CAN I DO HERE ?
              quantity: power,
              startDate: new Date(startedAtMilis + index * 1000),
              endDate: new Date(startedAtMilis + index * 1000),
            }));
            samples.push(...powerSamples);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant