Home Assistant Widget using KWGT and Tasker

Home Assistant Widget using KWGT and Tasker

This is a widget I built in KWGT that allows me to toggle devices and get the states of those devices. Using Tasker, AutoRemote and KWGT.

What you need for this widget:

  • Android OS phone
  • Tasker (paid app)
  • KWGT (paid app)
  • AutoRemote Lite (paid or free)
  • Home Assistant

Follow the instructions on this YouTube video:

Links for things you need:

Using Tasker with Home Assistant (link)

Example Task to toggle device on or off

https://taskernet.com/shares/?user=AS35m8kcoUYE0I3gDh%2FAT4XyMSPfbpC8kz%2Fof1baM1R4n1qaXvWHLKOM3CRXnU6JfKu6&id=Task%3APatio

{ "entity_id": "light.patio" }

Example Task to get state (on or off) of a device in Home Assistant

https://taskernet.com/shares/?user=AS35m8kcoUYE0I3gDh%2FAT4XyMSPfbpC8kz%2Fof1baM1R4n1qaXvWHLKOM3CRXnU6JfKu6&id=Task%3AGet+State

{{ states('light.patio') }}

KWGT Widget Example (you must edit to your environment)

KWGT Icon Set

https://drive.google.com/file/d/0Bw9plxrVJfKmaGlwVTk5WGRrZTA/view?usp=drivesdk

KWGT Formula to add gradient light behind an icon that the state is on:

$if(br(tasker, pl_state_k)=on,#FFFFEE9D,#FF000000)$
5 Likes

I mostly just wanted to say that this is an amazing tutorial, and thank you so much! Your very detailed and helpful video guide walked me (a relative newbie) through the process perfectly!

I did have one question - it seems to me that having the device state change trigger the input_boolean toggle, which in turn triggers the REST action, is adding extra steps? Why not just have an automation that triggers on device state change, and the action is the REST action right off the bat? Is it something to do with what’s (not) possible in the automation configuration?