So I 've been working on making sure a few things on my android device are set properly based on ST and I have it workign using IFTTT (although its overly complicated). I tried setting it up through Sharptools but I am running into a problem. I have a basic on/off button tile created and when its on I want tasker to run a few actions and when its off I need it to do other actions. I have the event for the button tile subscribed to in SharpTools and it works if I simply filter with the switch name (Tasker > Profile > Event > SharpTools > Thing name). But for the life of me, I can’t get it to specifically run when the switch is on, and when it is off do something else.
It sounds like you are really close! You’ll just need to use conditional actions in the profile.
Per the above article, you can do something like
IF %st_attr_value ~ on and
IF %st_attr_value ~ off
tried it, nothing happened. Which is why I was at a loss. It works with no IF, but then I can’t specify the switch state.
Which attribute are you subscribed to? Can you post a description export of your Tasker profile? Also, have you tried printing out the
%st_attr_name? Also make sure that you fully back out of Tasker when you make a change as a profile change goes active once you fully back out of Tasker.
When I set this up I had issues too. My mistake was typos. Had the attributes typed wrong and the switch name I was using. I had to use the whole name not just part of it. Fixed those and started working. I’m just using it to set a variable in tasker so pretty basic.
Looks like it was a typo error. Figured out the problem. Sorry for troubling you guys! @joshua_lyon thanks for the quick replies!
Thanks for the update!
I have another question, how can I set tasker on device boot to check the switch state and perform tasks? In the profile I am using Device Boot as the event, but not sure how to proceed further.
Edit: To explain a bit further, one of my devices have a tendency to restart every few days, so when it restarts I need it to be able to check the Switch State from sharptools and then perform the tasks associated with it.
You can use the action
Thing: Get Attribute which will query SmartThings for the device/attribute state and return the same variables mentioned above. If you setup the task for the event profile as a named task, you can even just call the same named task (eg. Create a new task where the first action is to get the attribute and the second action is to run the other task)
Glad to know I’m not the only one who typed it in wrong. It’s good when you find the issue and it’s easy to fix.
Also learned new trick. Didn’t realize I could start a task within another task. I was using a second profile to sense the attributes presence then running the task off that. Another light bulb over the head moment.
Thanks! That worked.
So I’ve been using Sharptools, autovoice and tasker (a lot more accurate than alexa listens) and I have a question. Is there anyway to have either tasker or autovoice recognize multiple commands? So for example I have a profile with a fairly extensive regex to recognize commands like “turn the basement lights on” or “open the family room shades”, but how would I go about setting it so it could run “turn the basement lights on and open the family room shades”?