Skip to content

Automations

tempus2016 edited this page Mar 23, 2026 · 2 revisions

Examples of useful automations using TaskMate sensors and services.


Notify Parents When Approvals Are Pending

Note: TaskMate v1.1.3+ has built-in notification support. Configure a notify service in Settings → Integrations → TaskMate → Configure → Settings → Notification Service for simple per-chore alerts. Use the automation below for more control — multiple recipients, conditions, custom messages, scheduling.

Send a push notification to the parent's phone when a chore is waiting for approval.

alias: TaskMate — Notify on pending approval
trigger:
  - platform: state
    entity_id: binary_sensor.taskmate_has_pending_approvals
    to: "on"
action:
  - service: notify.mobile_app_johns_phone
    data:
      title: "TaskMate ✅"
      message: >
        {{ state_attr('binary_sensor.taskmate_has_pending_approvals', 'pending_chore_completions') }}
        chore(s) and
        {{ state_attr('binary_sensor.taskmate_has_pending_approvals', 'pending_reward_claims') }}
        reward claim(s) awaiting approval.
      data:
        url: /lovelace/parent-dashboard

Remind Child to Complete Chores

Send a reminder if a child hasn't completed any chores by a certain time.

alias: TaskMate — Evening chore reminder
trigger:
  - platform: time
    at: "18:00:00"
condition:
  - condition: template
    value_template: >
      {% set children = state_attr('sensor.taskmate_overview', 'children') %}
      {% set child = children | selectattr('name', 'eq', 'Malia') | first %}
      {{ child.pending_points == 0 and child.points == child.points }}
      {# Simpler: check if done_today from todays_completions #}
action:
  - service: notify.mobile_app_malias_tablet
    data:
      title: "Don't forget your chores! 🌟"
      message: "You still have chores to do today. Check your chore list!"

Award Bonus Points for Good Behaviour

Use an input_button or a script to quickly award bonus points.

# input_button.yaml
input_button:
  malia_bonus:
    name: "Award Malia Bonus Points"
    icon: mdi:star-plus
 
# automation.yaml
alias: TaskMate — Award bonus on button press
trigger:
  - platform: state
    entity_id: input_button.malia_bonus
action:
  - service: taskmate.add_points
    data:
      child_id: a8c8376a
      points: 5
      reason: "Good behaviour bonus"

Weekly Summary Notification

Send a weekly summary of each child's activity every Sunday evening.

alias: TaskMate — Weekly summary
trigger:
  - platform: time
    at: "19:00:00"
condition:
  - condition: time
    weekday:
      - sun
action:
  - service: notify.mobile_app_johns_phone
    data:
      title: "TaskMate Weekly Summary 📊"
      message: >
        {% set children = state_attr('sensor.taskmate_overview', 'children') %}
        {% for child in children %}
        {{ child.name }}: {{ child.points }} pts | {{ child.current_streak }} day streak
        {% endfor %}

Complete a Chore via NFC Tag

Tap an NFC tag to automatically complete a chore without opening the app.

alias: TaskMate — NFC complete Make Bed
trigger:
  - platform: tag
    tag_id: "your-nfc-tag-id-here"
action:
  - service: taskmate.complete_chore
    data:
      chore_id: b3f9a12c
      child_id: a8c8376a
  - service: notify.mobile_app_malias_tablet
    data:
      title: "Chore completed! ⭐"
      message: "Make Bed marked as done. +5 Stars!"

Complete a Chore When a Smart Device is Used

Use a smart plug or presence sensor to automatically complete a chore.

Example: Brushing teeth — complete when bathroom motion detected at the right time:

alias: TaskMate — Auto complete brush teeth
trigger:
  - platform: state
    entity_id: binary_sensor.bathroom_motion
    to: "on"
condition:
  - condition: time
    after: "07:00:00"
    before: "08:30:00"
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - service: taskmate.complete_chore
    data:
      chore_id: brush_teeth_chore_id
      child_id: a8c8376a

Daily Streak Reminder

Remind a child if they haven't completed a chore today and their streak is at risk.

alias: TaskMate — Streak risk reminder
trigger:
  - platform: time
    at: "20:00:00"
condition:
  - condition: template
    value_template: >
      {% set children = state_attr('sensor.taskmate_overview', 'children') %}
      {% set child = children | selectattr('name', 'eq', 'Malia') | first %}
      {% set today_completions = state_attr('sensor.taskmate_overview', 'todays_completions') | selectattr('child_id', 'eq', child.id) | list %}
      {{ today_completions | length == 0 and child.current_streak > 0 }}
action:
  - service: notify.mobile_app_malias_tablet
    data:
      title: "🔥 Your streak is at risk!"
      message: >
        {% set children = state_attr('sensor.taskmate_overview', 'children') %}
        {% set child = children | selectattr('name', 'eq', 'Malia') | first %}
        You have a {{ child.current_streak }} day streak! Complete a chore before midnight to keep it going.

Display Pending Approvals on a Dashboard Badge

Show a badge on your parent dashboard that turns red when approvals are pending.

# In your dashboard YAML
- type: entity
  entity: sensor.pending_approvals
  name: Pending
  icon: mdi:clipboard-clock
  state_color: true

Or use a conditional card to show a banner:

- type: conditional
  conditions:
    - entity: binary_sensor.taskmate_has_pending_approvals
      state: "on"
  card:
    type: markdown
    content: >
      ## ⚠️ {{ states('sensor.pending_approvals') }} item(s) need your attention
    card_mod:
      style: |
        ha-card {
          background: var(--warning-color);
          color: white;
        }

Auto-Approve Chores After a Timeout

Automatically approve all pending completions if the parent hasn't approved after 24 hours.

alias: TaskMate — Auto approve after 24h
trigger:
  - platform: time_pattern
    hours: "/1"
condition:
  - condition: template
    value_template: >
      {{ state_attr('sensor.pending_approvals', 'chore_completions') | length > 0 }}
action:
  - repeat:
      for_each: >
        {{ state_attr('sensor.pending_approvals', 'chore_completions') |
           selectattr('completed_at', 'lt', (now() - timedelta(hours=24)).isoformat()) |
           list }}
      sequence:
        - service: taskmate.approve_chore
          data:
            completion_id: "{{ repeat.item.completion_id }}"

Jinja2 Template Examples

Useful templates for dashboard cards and automations.

Get a specific child's points:

{% set children = state_attr('sensor.taskmate_overview', 'children') %}
{% set child = children | selectattr('name', 'eq', 'Malia') | first %}
{{ child.name }} has {{ child.points }} {{ state_attr('sensor.taskmate_overview', 'points_name') }}

List all children and their streaks:

{% set children = state_attr('sensor.taskmate_overview', 'children') %}
{% for child in children %}
  {{ child.name }}: {{ child.current_streak }} day streak
{% endfor %}

Check if any child has a pending claim:

{{ state_attr('binary_sensor.taskmate_has_pending_approvals', 'pending_reward_claims') > 0 }}

Get today's completions for a specific child:

{% set completions = state_attr('sensor.taskmate_overview', 'todays_completions') %}
{% set child_completions = completions | selectattr('child_id', 'eq', 'a8c8376a') | list %}
{{ child_completions | length }} chores done today

Clone this wiki locally