I'm trying to create many Tasker widget as the light switch, the widget will set On/Off icon accordingly upon performing switch On/Off light task.
Here is what I have done:
Variable Add
Name: %TableLight
Value: 1
Wrap Around: 2
Variable Set
Set %devicename to Table Light
Perform Task: Switch On Table Light
Name: %devicename On
IF: %TableLight ~ 1
Set Widget Icon
Name: %devicename
IF: %TableLight ~ 1
Perform Task: Switch Off Table Light
Name: %devicename Off
IF: %TableLight ~ 0
Set Widget Icon
Name: %devicename
IF: %TableLight ~ 0
This task/widget is working fine, but my problem is that I am going to create many widgets, so I have to manually rename the %TableLight to some other variable names, which is really painful!
I'm looking for a smarter way that can set the %TableLight itself to variables.
Thanks.
John