Skip to content

dwoosnam/hass-ticktick

 
 

Repository files navigation

TickTick Integration from Home Assistant

This integration adds a custom service ticktick.add_task, which allows you to dynamically add tasks your Todo-list.

Installation

Add this repository to HACS and install over in the Integrations tab. To configure your credentials, navigate to the HASS Integrations page.

Exposed Services

  • ticktick.add_task

    Adding a task with title and content. Optionally, a due_date can be set.

    The due_date can either be in the format of 123m, which will create a Task due in 123 Minutes.

    Otherwise, you can set due_date to an absolute date. This must be in a format supported by dateutil

  • ticktick.get_projects

    Lists all projects and their ID. You can use the IDs to add a Task to a specific List/Project

Google Assistant

This requires IFTTT and an externally reachable HASS instance.

Instructions based on this

A combination of the Google Assistant trigger and the Webhooks action is used to trigger the new Home Assistant service via Google Assistant. One IFTTT applet must be made per Google Keep list of interest, with the list name (e.g., 'Grocery' in the example below) hardcoded into the applet. For example:

IF: Google Assistant/Say a phrase with a text ingredient

  • What do you want to say?: Add $ to the grocery list
  • What do you want the Assistant to say in response?: Okay, adding $ to your grocery list

THEN: Webhooks/Make a web request

  • URL: https://thisismyhassurl.org/api/webhook/ABCXYZ123456
  • Method: POST
  • Content Type: application/json
  • Body: { "action":"call_service", "service":"ticktick.add_task", "title":"{{TextField}}", "project":"whatever your project ID is" }

A Home Assistant automation to receive and process Google Assistant inputs via IFTTT can have the form:

automation:
  - id: ifttt_google_assistant_ticktock
    alias: "IFTTT: Google Assistant to TickTick"
    trigger:
      platform: event
      event_type: ifttt_webhook_received
      event_data:
        action: call_service
    action:
      - service_template: "{{ trigger.event.data.service }}"
        data_template:
          title: "{{ trigger.event.data.title }}"
          project: "{{ trigger.event.data.project }}"

Missing features:

  • Allow changing of priority

About

Home Assistant Integration for TickTick

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Shell 1.2%