02-25-2018 06:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 06:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I want to Display batteryLevel on watchface.
I referred "https://dev.fitbit.com/build/reference/device-api/power/#".
But I can't it.
"undefined" on my Console.
Is there a way to do it?
Answered! Go to the Best Answer.
Accepted Solutions
02-25-2018 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
In order to use that you need to do the following:
import { battery } from "power"; myBatteryLabel.text = battery.chargeLevel;
I hope this helps 🙂
02-25-2018 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 12:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
In order to use that you need to do the following:
import { battery } from "power"; myBatteryLabel.text = battery.chargeLevel;
I hope this helps 🙂
02-25-2018 14:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
02-25-2018 14:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Have you put an appropriately named label in your svg? The example uses myBatteryLabel as a label id.
02-25-2018 17:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 17:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Sorry, I have very easy miss.
Variable name is "battery" to display batteryLevel.
So I changed this variable name, I'm successful!
Thank you so much!

02-25-2018 20:04 - edited 02-27-2018 22:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 20:04 - edited 02-27-2018 22:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes this as just an example of the relevant code. It's the same way you
would set the text of time.

02-25-2018 22:14 - edited 02-27-2018 22:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-25-2018 22:14 - edited 02-27-2018 22:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
So glad you found it 🙂 It's a pleasure! Always great to help each other
😄 This forum is great!
