Git Product home page Git Product logo

taskerha's Introduction

TaskerHA

The TaskerHA integration allows you to connect the Tasker Android app with Home Assistant.

This makes use of the new HTTP Request event in the latest Tasker Beta. Requires Tasker 6.2+

What it does

  1. Expose Tasker profiles as switch entities
  2. Expose Tasker tasks as binary_sensor entities
  3. Expose Tasker scenes as select entities
  4. Expose Tasker global variables as text entities
  5. Trigger automations from Tasker commands
  6. tasker.perform_task service to perform Tasker tasks, like the Perform Task action in Tasker
  7. tasker.send_command service to send Tasker commands, like the Command action in Tasker
  8. tasker.backup service to backup Tasker config, like the Data Backup action in Tasker
  9. tasker.import_task service to import a Tasker task from XML, like the Import action in Tasker

How to use it

Installation & Setup

  1. Import and setup the accompanying HTTP API Tasker project
  2. Add repository to HACS. HACS > Integrations > Custom Repositories
  3. Add Integration in Home Assistant. Settings > Devices & Services > Add Integration
  4. Follow the instructions on screen to complete the setup.
  5. Enable the profile, task, scene, and global variable entities that you are interested in.

Configuration

  • Builtin Global Variables
    • Choose builtin Tasker global variables to add as text entities, the same as user-defined global variables.
  • Structure Global Variables Outputs
    • Works similar to Tasker. If the output is either JSON, HTML, XML, or CSV, enable this option so that you can easily read its contents via the value_json attribute.
  • Track Tasker commands
    • Fire Home Assistant events and trigger automations from Tasker commands. Commands will be queued and fired every scan interval. Disable if you aren't tracking commands in Tasker.
  • Scan Interval
    • Tasker data and commands poll rate

Reference

Profiles

  • switch entity
Attribute Description
state Tasker profile is enabled
active Tasker profile is active

Tasks

  • binary_sensor entity
Attribute Description
state Tasker task is running
last_return Last return value from calling tasker.perform_task
  • tasker.perform_task service
Field Description
target Tasker task to perform
par1, par2 Values assigned to par1 and par2 are available in the selected task as normal variables.
variables Variables to forward to the task as local variables.
structure_output If the return value is either JSON or XML, enable this option so you can easily read its contents in the last_return attribute of the selected task's entity.

Scenes

  • select entity
Attribute Description
state Tasker scene displaying as
options Options for Display As in Show Scene Tasker action

Globals

  • text entity
Attribute Description
state Current value of Tasker global variable
value_json Structured output of state

Commands

Rate limited by scan interval

  • tasker_command event
Field Description
command The full command
prefix The part of the command on the left of =:= or the whole command if =:= is not present
params List of parts on the right of =:=
  • Tasker command received device trigger
Field Description
command Command to trigger on. You can use regex to match multiple commands. If not set will trigger on any command.

Misc

  • tasker.backup service
Field Description
username If you set this account, a file will be created in your backup folder on Google Drive.
  • tasker.import_task service
Field Description
xml Tasker XML Data for the task being imported

taskerha's People

Contributors

lone-faerie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

taskerha's Issues

Setup Issue

Hi, this looks great. I'm having an issue with setting up the integration in HA:

This error originated from a custom integration.


Logger: custom_components.tasker
Source: custom_components/tasker/__init__.py:319
Integration: Tasker (documentation)
First occurred: 1:59:55 PM (36 occurrences)
Last logged: 2:52:05 PM

Error on first refresh
Traceback (most recent call last):
  File "/config/custom_components/tasker/__init__.py", line 319, in async_config_entry_first_refresh
    await self.async_fetch_all()
  File "/config/custom_components/tasker/__init__.py", line 429, in async_fetch_all
    g.name for g in await self.client.async_get_globals() or []
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/taskerapi/__init__.py", line 431, in async_get_globals
    global_vars = [
                  ^
  File "/usr/local/lib/python3.11/site-packages/taskerapi/__init__.py", line 432, in <listcomp>
    TaskerGlobalDecoded(**g) for g in
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 5, in __init__
  File "/usr/local/lib/python3.11/site-packages/taskerapi/typing.py", line 67, in __post_init__
    self.value = base64.b64decode(self.value).decode('ascii')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 148: ordinal not in range(128)

I populate the Host field with my phone IP address then submit the integration. I then get a notice on my phone to allow the API key generation, I then enter my phone PIN, the screen in HA says 'Success' but then fails to load the integration with this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.