You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good, I do not know if you have raised the idea of adding the health status, there is documentation available and does not look complicated, I took the trouble to take a snippet of code from the script.js file and add code as an example.
functionupdateAllBatteryInfo(){updateChargeInfo();updateLevelInfo();updateHealth();updateChargingInfo();updateDischargingInfo();temperature.innerText=battery.temperature+'°'temperatureUpdateInterval=setInterval(()=>{temperature.innerText=battery.temperature+'°'},60000*5);}updateAllBatteryInfo();//eventsbattery.addEventListener('chargingchange',updateChargeInfo);battery.addEventListener('levelchange',updateLevelInfo);// new functionbattery.addEventListener('healthchange',updateHealth);battery.addEventListener('chargingtimechange',updateChargingInfo);battery.addEventListener('dischargingtimechange',updateDischargingInfo);functionupdateChargeInfo(){a=document.querySelector('#container');battery.charging ? (a.classList.add('charging'),setInterval(()=>{temperature.innerText=battery.temperature+'°'},60000*2)) : (a.classList.remove('charging'),alarm.pause(),setInterval(()=>{temperature.innerText=battery.temperature+'°'},60000*5));}functionupdateHealth(){h=document.querySelector('#health');// add function, more info: https://developer.kaiostech.com/docs/api/web-apis/batterymanager/health}
Regards.
The text was updated successfully, but these errors were encountered:
Thank you for the idea.
I have indeed already thought about it and I will add it to the version 1.5.0.
There is still another version in the QA process and after that, I will soon start to develop the new version.
I won't display the health directly, but will give an alert if your battery is overheating or if it's too cold.
I would greatly appreciate your thoughts on that way of implementing it.
Good, I do not know if you have raised the idea of adding the health status, there is documentation available and does not look complicated, I took the trouble to take a snippet of code from the script.js file and add code as an example.
Regards.
The text was updated successfully, but these errors were encountered: