Chore Helper - Track recurring or manual chores with flexible scheduling

- alias: 'Overdue Chores'
    trigger:
      - platform: time
        at: '10:00:00'
    action:
      - variables:
          odchores: >
             {% set c = states.sensor | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'chore_helper__schedule') |  selectattr('entity_id', 'has_value') | list %}
             {% set odcount = c | map(attribute='state') | map('int') | select('<=', 10) | map('string') | list %}
             {{ c| selectattr('state', 'in', odcount) | map(attribute='attributes.friendly_name') | list }}
          qty: "{{ odchores | count }}"
          p1: "{{'is' if qty == 1 else 'are'}}"
          p2: "{{'s'  if qty > 1  else ''}}"
      - condition: template
        value_template: "{{ qty > 0 }}"
      - service: notify.xxx
        data:
          title: "Overdue Chores"
          message: "There {{p1}} {{qty}} overdue chore{{p2}}. {{odchores  | join(', ')}}"

This will run daily at 10am. You could also schedule it to run on certain days only.

You would add this code after trigger and before action…

condition:
      - condition: time
        weekday:
        - sun

Also for the notification part you can do it different ways:
1- https://www.home-assistant.io/integrations/persistent_notification/integration can be used to show a notification on the frontend.

2 - setup an email notifier.

3 - setup a text notifier though this can have limitations like verizon is 160 characters and includes email address in that count so stuff is getting cut off in my testing.

1 Like