variables returns null
Moderator: Martin
-
- Posts: 6
- Joined: 01 Aug 2015 14:42
- Location: Germany
variables returns null
Hi all, I tried to get the battery level and show UT via a messagebox or statusbar information. But any variable (except the date and time) returns NULL. Even if i download some examples.
Null will be returned for any variable which belonfs to battery....
Has anybody any idea?
I have a huawei y550, Android 4.3
Thanks
Albatrosxl
Null will be returned for any variable which belonfs to battery....
Has anybody any idea?
I have a huawei y550, Android 4.3
Thanks
Albatrosxl
-
- Posts: 6
- Joined: 01 Aug 2015 14:42
- Location: Germany
Re: variables returns null
This happrns also in my Tablett (medion\lenivo).
What might be the Problem?
Both are not rooted.
In the other Hand, tasker, Automaten, macrodruide are able to return a correct value
What might be the Problem?
Both are not rooted.
In the other Hand, tasker, Automaten, macrodruide are able to return a correct value
Re: variables returns null
Hei. How are you trying to access the info? Using some variable like this? {battery_percentage,numberformat,0}
You have to use it in a flow that first initializes these values, by either using the trigger battery level or condition battery level. Otherwise they are null. There should be an acrion like init variables battery info.
You have to use it in a flow that first initializes these values, by either using the trigger battery level or condition battery level. Otherwise they are null. There should be an acrion like init variables battery info.
Re: variables returns null
While you could use the cobdition in your flow and link it to the next block weather its true or false, you can also get the battery percentage with execute command
cat /sys/class/power_supply/battery/capacity
cat /sys/class/power_supply/battery/capacity
-
- Posts: 6
- Joined: 01 Aug 2015 14:42
- Location: Germany
Re: variables returns null
Thanks for the response.
The flow is a very simple one and has only one trigger, one action.
The trigger is "ACCU LADEZUSTAND"(battery level)
The action is "benachrichtigung auf display anzeigen"(show message on display" ) using the variable battery percentage… ..
I also tried some downloaded flows from this forum like “battery log, strom an, strom weg… . And here are the same results. All values of the variables are null (independent if i use battery level, battery health, battery percentage… )
Is it possible to upload the flow to give you more information?
Thanks,
Albatros
The flow is a very simple one and has only one trigger, one action.
The trigger is "ACCU LADEZUSTAND"(battery level)
The action is "benachrichtigung auf display anzeigen"(show message on display" ) using the variable battery percentage… ..
I also tried some downloaded flows from this forum like “battery log, strom an, strom weg… . And here are the same results. All values of the variables are null (independent if i use battery level, battery health, battery percentage… )
Is it possible to upload the flow to give you more information?
Thanks,
Albatros
Re: variables returns null
Yes. But since i'm not having this issue it may be device dependent. I have a HTC on lollipop.
Try the execute command way
Try the execute command way
Re: variables returns null
Hi,
Maybe some typo in the variable names. Automagic is case sensitive so using Battery_percentage (upper case B) would show null.
Try to remove the action and add a condition Debug Dialog instead. The condition shows a list of all variables and the corresponding values when the flow is executed. Also ensure that the real trigger executes the flow and you do not manually execute the flow with menu->Execute/Ausführen since variables are not provided when executing manually.
Regards,
Martin
Maybe some typo in the variable names. Automagic is case sensitive so using Battery_percentage (upper case B) would show null.
Try to remove the action and add a condition Debug Dialog instead. The condition shows a list of all variables and the corresponding values when the flow is executed. Also ensure that the real trigger executes the flow and you do not manually execute the flow with menu->Execute/Ausführen since variables are not provided when executing manually.
Regards,
Martin
Re: variables returns null
For testing purposes you can add a battery level condition and a debug dialog next, then trigger the flow manually and see what comes out. Works for me on 2 devices> sony tablet and htc phone, both lollipop
-
- Posts: 6
- Joined: 01 Aug 2015 14:42
- Location: Germany
Re: variables returns null
Perfect. The hinter of Martin was the solution.next i will try that hinter regarding the debug Prozess.
Thumbs up
Thumbs up
-
- Posts: 6
- Joined: 01 Aug 2015 14:42
- Location: Germany
Re: variables returns null
Hi, i tried now the debug mose and all variables show NULL.
Thanks agäin for your help in this
Albatrosxl
Thanks agäin for your help in this
Albatrosxl