How to format the Battery_percentage for Speech/Notific.

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

How to format the Battery_percentage for Speech/Notific.

Post by husky » 27 Nov 2016 02:58

I'm struggling to find an example of how to display the battery_percentage.

I also tried with Speech Output but it just reads back the text. Can't make it "tell" the numeric value for the percentage.

I'd like to have real life example to guide me but could not find any, except one in XML. Doesn't help me at all.

I'll appreciate any help.
"Basic research is what I'm doing when I don't know what I'm doing"

P-chu
Posts: 32
Joined: 05 Nov 2016 19:12

Re: How to format the Battery_percentage for Speech/Notific.

Post by P-chu » 27 Nov 2016 19:05

Hi husky,

This site's Help > "Creating a Custom Widget" uses the battery level as part of its example. It used the trigger "Battery Level", but there is a condition equivalent, which I assume is what you have tried or looked at. Both trigger and condition returns a variable, battery_level, which is a percentage value, and all you need to do is output it with a percentage sign (you could use one of the notification actions, or the widget example). In either trigger or condition, you will want the settings to be "higher than" and the percentage bar to the lowest possible level so it activates at each change of the battery power higher than 0%.

Hope this helps.
P-chu

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: How to format the Battery_percentage for Speech/Notific.

Post by husky » 28 Nov 2016 07:12

Hello P-chu

Thanks for the reply.

Your reply sure helped. Problem solved
"Basic research is what I'm doing when I don't know what I'm doing"

Post Reply