Chore Helper - Track recurring or manual chores with flexible scheduling

I must be doing something wrong but I can’t seem to get the card configured?


I still have this problem. Counter is not decrementing daily. It stopped some 15 days ago…
Any help.? Thanks.

I have done the automatons and cards. It is amazing, thank you!! One question - how can I get an automation alert notification when chores go to “due today” and “overdue” like this one that is now overdue

Ok maybe I am not reading it right but I just changed my AC Filter on 3/1/2024

So I created a new Chore helper:

image

Set the Start date 3/1/2024

image

Yet the sensor shows the following with the next_due_date as the start date I put in.

image

What’s the best way to fix this?

Hi,

I am just setting this up today. and it doesnt show any off the chores that are due today when using the following card, am i doing something wrong?

type: custom:auto-entities
card:
  type: entities
  title: Vandaag
  state_color: true
  show_header_toggle: true
filter:
  include:
    - integration: chore_helper
      state: '0'
      options:
        tap_action:
          action: call-service
          service: chore_helper.complete
          service_data:
            entity_id: this.entity_id
sort:
  method: state
  numeric: true
show_empty: true

Kind Regards,
Dion

state: '= 0'

You have ‘0’

1 Like

Example of some testing…

 - alias: 'Chore Test'
    trigger:
      - platform: time
        at: '08:00:00'
    action:
      - variables:
          chores: >
              {% set b = states.sensor | selectattr('object_id', 'match', 'hottub') 
                          | selectattr('state', 'eq', '1') | list %}
              {{ b if b | count == 0 else b | map(attribute='attributes.friendly_name')  | list }}
          qty: "{{ chores | count }}"
          p1: "{{'is' if qty == 1 else 'are'}}"
          p2: "{{'s'  if qty > 1  else ''}}"
      - condition: template
        value_template: "{{ qty > 0 }}"
      - service: notify.xxxx
        data:
          title: "Chores Reminder"
          message: "This week there {{p1}} {{qty}} Chores{{p2}}. {{chores  | join(', ')}}"

image

My sensors for this test begin with sensor.hottub_
Test with state equal to ‘1’

How would that work without the hottub chores though? More generically?

% set b = states.sensor | selectattr('attributes.device_class', 'defined')
selectattr('attributes.device_class', 'eq', 'chore_helper__schedule') |  selectattr('entity_id', 'has_value') | list %}
{% set count = b | map(attribute='state') | map('int') | select('<=', 20) | map('string') | list %}
{{ b| selectattr('state', 'in', count) | map(attribute='attributes.friendly_name') | list }}
 

You can put this in the Template under developer tools.
Basically listing any item that is device class chore_helper_schedule with a state less than 20.

Awesome, so I could use this as a condition template in a notification automation each week?

So I send it as an email and text. Though with verizon there is a 160 character limit so stuff can get cut off. Though it seems to actually get cut off at 133 characters from more testing.

  - alias: 'chore helper test'
    trigger:
      - platform: time
        at: '06:43:00'
    action:
      - variables:
          chores: >
             {% set b = states.sensor | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', 'chore_helper__schedule') |  selectattr('entity_id', 'has_value') | list %}
             {% set count = b | map(attribute='state') | map('int') | select('<=', 10) | map('string') | list %}
             {{ b| selectattr('state', 'in', count) | map(attribute='attributes.friendly_name') | list }}
          qty: "{{ chores | 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: "Chores Reminder Test"
          message: "This week there {{p1}} {{qty}} Chores{{p2}}. {{chores  | join(', ')}}"
1 Like

This is awesome! Works perfectly, thank you so much! Is there a way to do this for chores that become overdue too? Say once they become a day overdue?

- 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

You. Are. Awesome!! Thank you so much for these, they work fantastic with this awesome integration. Cheers again for everyone’s hard work. I now have a really good chore routine setup.

Great - share your screenshots!

It is notifying me of chores which aren’t in the overdue status, I have realised. Any reason why that might be?

Would need more info…Your code alerts. Did you check the items to make sure everything looks correct?

Or take the part of the code

{% 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 }}

Go into Developer Tools, Template and see if you get the results you were expecting.

Thanks, so I did that - see first screenshot. It looks like it is listening for all the chore sensors and then filtering out some but I am not sure how the filtering is working because as you can see, the template editor in develop tools gives me this;

but these are where my chores stand in terms of what is currently due - aka nothing at the moment -

I have also realised that clicking the sensor to update its last state isn’t restorying the numeric count configured for ‘x every’ amount of time. To do this you need to actually go in and update the sensor. This has to be a bug?

Code looks correct as the top items are all items less than 10 days out. The other list is a list of all sensors.

I think the Weekly code is broken so I use the monthly/daily/yearly depending on my needs and so far it seems to be working. I have it reset dates and write to a file.