Hello,
I am trying to make a battery notification widget because sometimes my discharges when plugged in. So a notification when this happens would be great but I need a new variable because I can't make a derivative (dbattery_level/dt) with enough sensitivity to accomplish this. Is there anyway that this could be implemented?
An example is just a mA variable or a %/hr of battery discharge & recharge.
Electrical Current Usage
Moderator: Martin
Re: Electrical Current Usage
Hi,
As far as I'm aware this is not directly possible. It would be interesting to see what condition Battery Level: higher than 0% shows in variable battery_status when this happens. Android should provide value 3 when it's discharging, however I assume this is not the case when a charger is connected. The condition also provides some more variables that could be interesting for this special case like temperature, voltage and health. Check the help page of the condition to see what variables are available and the meaning of the codes.
You could use a trigger Periodic Timer: 1m (Don't wake device) and check if the battery level is going down with a condition Battery Level: higher than 0% and a global variable to remember the previous value of the level or the voltage. I assume that your device is awake when this problem occurs so the trigger does not have to wake the device on it's own which reduces the battery consumption of the flow when your device is charging properly.
Regards,
Martin
As far as I'm aware this is not directly possible. It would be interesting to see what condition Battery Level: higher than 0% shows in variable battery_status when this happens. Android should provide value 3 when it's discharging, however I assume this is not the case when a charger is connected. The condition also provides some more variables that could be interesting for this special case like temperature, voltage and health. Check the help page of the condition to see what variables are available and the meaning of the codes.
You could use a trigger Periodic Timer: 1m (Don't wake device) and check if the battery level is going down with a condition Battery Level: higher than 0% and a global variable to remember the previous value of the level or the voltage. I assume that your device is awake when this problem occurs so the trigger does not have to wake the device on it's own which reduces the battery consumption of the flow when your device is charging properly.
Regards,
Martin