Tasker toggle

Power Toggles supports creating custom toggles using tasker. These toggles can show on/off state, counters or even multiple states with different icons for each state.

Check out this fan made video tutorial for creating tasker toggles

Quick guide

  1. In tasker, create a task.
  2. For actions to run when the toggle is turned on, use if condition %state is set
  3. For actions to run when the toggle is turned off, use if condition %state is not set
  4. Add a action for PowerToggles to set the new state of the current task (PowerToggles should appear in the plugin section of tasker named as "Modify Toggle State")
  5. In PowerToggles, edit any widget or create a new widget and add a "Tasker task toggle" and select the newly created task.

Note that in PowerToggles there would be two options for Tasker.

  1. Tasker Toggle which is the new 2-state toggle (under plugins section)
  2. Tasker Shortcut which is the old one-click task shortcut (under Shortcuts section)

Simple task

Following pictures describe a sample toggle which shows a notification when activated and removes it when deactivated.

Create a new tasker task and add an action Alert > Notify.

Make sure to set the if condition to %state is set

Add another action Alert > Notify Cancel

Make sure to set the if condition to %state is not set

Add the PowerToggle Plugin action from Plugin > Modify PowerToggle state

Configure the plugin to set the current state of the toggle to new state. The current toggle is automatically taken based on the running task. The new state is automatically set to the desired state. You can also set the state to a more specific on/off state (like if you are using the if condition)

Your final task should look like the image above

Now in PowerToggles widget config screen

select 'Add Toggle' and select 'Tasker Toggle'