Can you expand upon how you did this? Looks great!
Subscribed!
This is an awesome idea, but without an explanation and instructions itâs just a major teaseâŚ
Do us a solid @broesie and show us how you did it.
Okay, Let me explain itâŚ
Requirements: Tasker knowledge + AutoNotifcation or Custom Quick SettingsâŚ
First of all, you can do it by using 2 different plugins.
For people who knows me, they know Iâm a big fan of the Autoapps. (you can see that in the tutorials I made on youtube, (made more then 100 tutorials for tasker)
I prefer to use the autoapps, because that bundle can do way more things, that you possible can think.
Autoapps contains AutoNotification, AutoVoice, AutoContacts, AutoRemote, AutoArduino, AutoShare, and way moreâŚ
In my case I use AutoNotification to control my Quick TogglesâŚ
It can be used without root. Also my phone is running Android Nougat 7.0 (Nexus 6P)
AutoNotification can be found here: https://play.google.com/store/apps/details?id=com.joaomgcd.autonotification
I recommend to buy the unlocked version, or to get a subscription to AutoApps (full pack, all unlocked + betas + alphas)
Another way is using Custom Quick Settings. That can be also used for lower versions of android.
I dont prefer this method, because it has way less possibilitiesâŚ
Custom Quick Settings can be found here; https://play.google.com/store/apps/details?id=com.quinny898.app.customquicksettings
I will explain the method of AutoNotification:
First create a toggle on your quick settings, you can create 20 different toggles if you wantâŚ
First you need to understand how to use Tasker to control your devices on HASS by using HTTP post and JSON.
You can find info on this post: Create your own personal assistent with Tasker (in multi language) + Google Now integration
What I did to create toggles like this:
I prefer to create two task (because I can use those tasks in other tasks as well).
Example: Control Living Lights, so I create a task âLiving Lights ONâ and âLiving Lights OFFâ
Also for example I use the 2nd AutoNotifcation Toggle.
So my task for Living Lights ON would be like this:
- Action 1: AutoNotification Tiles: Tile 2, Command: Toggle=:=living, Icon: Icon choosen from the iconpack, State: Active, Label; Living Lights
- Action 2: HTTP Post: http://yourhost:8123/api/services/light/turn_on?api_password=xxxxx
inside DATA / File: {"entity_id":"your id of your device"}
content type: application/json
- Action 3: Set variable: %Livinglights to On
For the Living Lights OFF you do the same, but in action 1, you set as state Inactive, and in action two, you use light/turn_off, and action 3 would be Set variable %Livinglights to Off
So those 2 tasks can put your lights either on or offâŚ
So letâs create now a toggle task. I call it for example: âToggle Living Lightsâ
To do so, you need to create 5 actions. So the task will be like this:
Action 1: If %Livinglights ~ On
Action 2: Perform task: Living Lights OFF
Action 3: Else if %Livinglights ~ Off
Action 4: Perform task: Living Lights ON
Action 5: End If
So now you have created your toggle task for your light.
Letâs create another toggle to control other toggles as well, I call it eg: Toggle control
Inside that task, it contain the following actions:
Action 1: Perform task: Toggle Living Lights if %ancomm ~ living (this is the same on the right side of the =:= of the command earlier)
Action 2: if you have more toggles you can add here....
Now only 1 thing to do is create a profile to link the toggle task to it. That is by using AutoNotification
Profile > Event > AutoNotification
As message you type: Toggle
Link now your task Toggle control to itâŚ
Summary: For each thing I created 2 task (because if I want I can use those task later on, in other tasks as well).
I created 1 toggle for the device. And I created 1 main task to control the commands of all my other toggles.
I also added some action, because I also can control it by KLWP if I want it, just by linking the right task to itâŚ
If you use the Custom Quick Settings plugin, I would be similar, except, the 1st action in side your ON or OFF task would be replaced by the action of Custom Quick Toggles SettingsâŚ
Example of ON and OFF tasks:
Example of Toggles tasks:
Example of Toggle Control:
Choosing different AutoNotification Toggles:
RESULT:
This is fantastic!! Thank you! However (doesnât there always seem to be a âhoweverâ in these thank you posts), I seem to be having a problem with the Toggle task. I have my On and Off tasks setup and they run as expected when I test them in Tasker. When I test the Toggle task, it stops on the Perform Task for whichever condition tests true and pops up an error that the task doesnât exist.
The task was selected from within the app by tappig the magnifying glass though, not manually typed in.
Any help or pointers would be greatly appreciated!
Just exit tasker, and then open tasker again, that way you ensure tasker that it will save⌠Sometimes when you creating new tasks, its not found, just get out of tasker, and open it again, and you will find your taskâŚ
That was it! Thank you again!
@atomicpapa and @broesie I am stuck and I donât know why I cannot get it working. I have created two tasks. One to turn the light on
and one to turn the light off
. If I run then in Tasker they both work, no problem here.
Toggle Living Lights
task also works. If I run it I get no error in my Tasker log, so I assume itâs OK.
The problem must be in Toggle Control
Toggle in tasker profile. My Toggle control looks like this:
When creating a profile, according to instruction I should:
Profile > Event > AutoNotification
As message you type: Toggle
I donât really know what is meant with this. I think it should be a filter and like in the @broesie screenshot?
My Quick Setting is shown correctly in notification area. When I click it, nothing happens.
Any help would be greatly appreciated.
Anybody else?
You rocks !
This solution is perfect thanks !
Hi, @broesie. I just implemented a few toggles in tasker and they work pretty goodâŚI just wondered if it is possible to get the state of the light or other entitys from HA into tasker?
Iâm using Join. When something happen on HA, it will automatically send the variables to my tasker. When Tasker receive it, it will send it to my KLWP Homescreen, so it will immediatly change it there tooâŚ
So you need only one profile and one task in Tasker to retrieve the info from HA and you need to create multiple automations inside your HA.
Hi
I just got this to work. Nice solution, thanks!
Is it only for me that it takes like 2-3 seconds for the Tiles to update and execute the task? If I run the task one by one they will execute directly. But running from the notification menu takes 2-3 seconds. Sometimes itâs done directly. Activate (On) can take 2-3 seconds but disabling (Off) runs directly almost all the time. Also, if you pull up the notification menu directly after pressing a Tile the task wonât execute.
Anyone else with the same âissueâ?
Br Qxlkdr
Thanks you. This is great.
I have the same issue as you and I am stuck at creating a profile then event etc.
Did you resolve the issue?
Maybe @atomicpapa or @broesie can help?
Thanks.
Yes, it can take sometimes a few seconds before it will update the tiles. I let the developer know, I worked together wih him, and now he is also the developer of tasker itselfâŚ
Stuck in creating a profile? Can you explain more in detail?