using battery variables

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
rsegoly
Posts: 46
Joined: 14 Jun 2013 15:30

using battery variables

Post by rsegoly » 14 Jun 2013 15:34

I try using battery level variable but I get null as it`s value

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: using battery variables

Post by Martin » 15 Jun 2013 06:55

Hi,

Hard to say what went wrong without more information. Can you describe how your flow looks like or publish the flow and post the link to the flow?

Perhaps you executed the flow manually (via menu->Execute). In this case the flow is not started by the regular trigger-event from the operating system and the variables provided by the trigger are therefore not available in the flow.
In this case you either have to wait for the real trigger to execute the flow or add a condition Battery Level before the action is executed. The condition will provide the battery variables to the flow (see the help page of the condition to see what variables are provided).
You can also add a condition Debug Dialog to the flow. A dialog will show all variables available to a flow when the condition Debug Dialog is executed (global and flow-local).

Regards,
Martin

Roni Segoly
Posts: 3
Joined: 08 Jun 2013 18:18

Re: using battery variables

Post by Roni Segoly » 15 Jun 2013 09:07

without knowing the answer I used the second method and it worked and now I understand why.
Thanks
Now, how can I create a flow which reports my location every 5 minutes? This variable is not available as well in other flows.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: using battery variables

Post by Martin » 18 Jun 2013 15:30

Hi,

You can create a flow with a trigger Periodic Location Update: every 5m and use the available variable location directly in this flow. You can also use an action Init Variable Location in a flow to determine the current location.
The location can be displayed using an action Notification on Screen: {location,locationformat}.

Regards,
Martin

Post Reply