Tasker Conditional Actions

This is a draft stub of this article and may have formatting and grammatical errors.
Looking for details on how to use conditions in  SharpTools.io rules or dashboards? Check out the related dashboard and rule articles:

High Level Approach

Things

  • Long press on the thing in the main SharpTools UI and subscribe to the desired Attribute
  • Setup a Thing State event in Tasker to react to the push event from the subscribed attribute
  • Create the desired action - such as Notify to display the value
  • At the bottom of the action, click the + sign next to IF to setup a conditional execution
  • Set the left variable to the desired SharpTools variable - for example %st_attr_value
  • Set the conditional operator to the desired type - typically use match (~) rather than equals (=)
  • Set the value on the right side of the operator to the desired value - use lower-case to case-insensitive matching

Modes

  • Open the modes pane in SharpTools, long press on any mode, and choose 'Subscribe to all mode changes'
  • Setup a Mode Change event in Tasker to react to mode changes
  • Create the desired action - such as Notify to display the value
  • At the bottom of the action, click the + sign next to IF to setup a conditional execution
  • Set the left variable to %st_mode
  • Set the conditional operator to the desired type - typically use match (~) rather than equals (=)
  • Set the value on the right side of the operator to the desired value - use lower-case to case-insensitive matching
    Example: %st_mode ~ night
For more details on how to use conditional actions with Mode changes, check out the Conditional Mode Change article which includes a video showing how to react to only specific mode change events.

Key Items to Check

  • Keep in mind the way Tasker does pattern matching
  • Make sure you are subscribed to the thing/attribute
    • A star icon will be displayed next to the thing name if you are subscribed to any of it's attributes
  • Make sure the filter on the Thing State is set to catch the event
    • For testing purposes, try leaving the filters blank to match everything
    • Remember that the filters do partial matching
  • Try using flash or notify to display the contents of the variable to make sure you are getting the values you expect

Screenshots

Ensure the thing/attribute is subscribed:
    SharpTools Subscription
    

Make sure the Thing State filters will catch the event / attribute change you are looking for:
     Tasker Thing State Filters
     
Setup conditionals on the actions - typically using matches (~) and lowercase:
     Tasker Conditional Action
     

Make sure you are matching against the desired variable and value:
     Tasker Conditional Configuration
     

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.