battery charging variable

4,010 views
Skip to first unread message

Remie

unread,
Sep 30, 2011, 10:52:13 PM9/30/11
to Tasker
Is there a way to have a variable for charging. I have a widget that
gives me a battery status and when the batt percent changes so does
the icon. And when its charging it is a different set of icons. When
its charing i have it set on a loop. But after i unplug it it stays in
the loop and wont go to the regular icons. The only thing i can think
of is putting in a stop if i can figure out a variable for battery
charging.

Pent

unread,
Oct 1, 2011, 4:24:24 AM10/1/11
to Tasker
> Is there a way to have a variable for charging.

State: Power (Any)
Enter Task: Variable Set, %MYPOWERVARIABLE, 1
Exit Task: Variable Clear, %MYPOWERVARIABLE

Pent

Remie

unread,
Oct 2, 2011, 10:35:39 PM10/2/11
to Tasker
Thank you. It worked. And a lot more about this app makes so much more
sence

Rodolfo de Vries

unread,
Sep 26, 2013, 2:12:18 PM9/26/13
to tas...@googlegroups.com
I have a task shortcut, which turns off the screen after disabling wifi, sync etc.... When I call this task, there is a popup & sound if the battery level is low. I want this warning only to appear if the phone is not connected to the charger. In this case a profile, based on state is not the solution, so I thought there would be a variable for the charging state, but cannot find it. Anyone who can help me? Thanks!

Brandon Horwath

unread,
Sep 26, 2013, 4:25:27 PM9/26/13
to tas...@googlegroups.com
New profile:

Event: Power, Battery, Level Changed, < (desired level + 1)
+
State: Power, Power, Source: Any, Invert: checked

Enter: Popup Warning

Rodolfo de Vries

unread,
Sep 27, 2013, 5:44:41 AM9/27/13
to tas...@googlegroups.com
Sorry, I didn't make myself clear. I am looking for a variable just like e.g. %WIFI or %SCREEN, which do not require an running profile, but are only evaluated when needed.
I've got already several profiles running, which all drain my battery and use process memory, so I didn't like the profile based solution earlier in this topic.
If there is no such variable, this post can be considered to be a feature request :)
Thanks, Rodolfo

Brandon Horwath

unread,
Sep 27, 2013, 9:18:15 AM9/27/13
to tas...@googlegroups.com
You were clear, I was not.

I am looking for a variable just like e.g. %WIFI or %SCREEN, which do not require an running profile, but are only evaluated when needed.

Okay, there is %BATT...

I've got already several profiles running, which all drain my battery and use process memory, so I didn't like the profile based solution earlier in this topic.

A battery monitor is one of the the most process and power hungry monitored variables tasker has. So, really you wouldn't like the solution you envision, which exists already.

If there is no such variable, this post can be considered to be a feature request :)

... there is already.

Wes Stacey

unread,
Sep 27, 2013, 11:05:41 AM9/27/13
to tas...@googlegroups.com
Yes the solution given at the top (Looping constantly) is not Ideal, but there is a context event called "Battery Changed" which will trigger whenever the battery changes, you can use it to run a task whenever the battery changes, depending on what you are doing it shouldn't take much battery power. such as update a widget whenever the battery changes. 

I assume that will use less power than a constant loop.

-Wes

Sinan Ghareb

unread,
Sep 27, 2013, 4:19:03 PM9/27/13
to tas...@googlegroups.com
+1 I have it exactly at that state "Battery Changed" and it's working perfectly.

Rodolfo de Vries

unread,
Sep 27, 2013, 5:25:46 PM9/27/13
to tas...@googlegroups.com
>> If there is no such variable, this post can be considered to be a feature request :)
>>... there is already.

Any ideas about the probability of this feature getting implemented?

Joseph Richman

unread,
Sep 27, 2013, 8:05:24 PM9/27/13
to tas...@googlegroups.com, remie...@gmail.com
I setup a project on mine that will detect power and change the power variable based on type of power as well as having no power. This way I can use the variable to detect where AC, Wireless or USB is used and have a task act accordingly.  Here is the exported Project: https://www.dropbox.com/s/1rhp2twa46zbo7v/Power_State.prj.xml

Wes Stacey

unread,
Sep 30, 2013, 10:30:27 AM9/30/13
to tas...@googlegroups.com


On Friday, September 27, 2013 4:25:46 PM UTC-5, Rodolfo de Vries wrote:
>> If there is no such variable, this post can be considered to be a feature request :)
>>... there is already.

Any ideas about the probability of this feature getting implemented?

It doesn't need to be you can create your own as Pent showed in the second post.... 
Reply all
Reply to author
Forward
0 new messages