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

Power API usage

ANSWERED

I'm being really dense, but I can't seem to tap into the battery API to get the chargeLevel.  I execute the following and it builds, but at runtime, I get the error below.  

 

 

import { battery, charger } from "power";

 

 myBattery.innerText = battery.chargeLevel;

 

when I use this, I get:

 

  • [12:42:09 PM]Unhandled Error
  • [12:42:09 PM]Cannot find module 'power'
  • [12:42:09 PM] at ./app/index.js:9:5
Best Answer
1 BEST ANSWER

Accepted Solutions
Best Answer
3 REPLIES 3

You're not dense, it's just not available yet!

https://dev.fitbit.com/release-notes/2017-09-26-dp1/#firmware

Best Answer

Thanks!  I read the notes before and just didn’t pick up about the Power, thanks for the response.

Best Answer

Thanks for asking this question.  I too was having problems getting the battery information. 

 

Best Answer
0 Votes