################################################################################ # chore-tracker-ha.yaml (AUTO-GENERATED — edit chores_config.yaml) # Kids: Emma, Liam, Zoe # # BIDIRECTIONAL SYNC: # Screen to HA: Each switch calls homeassistant.service on toggle # HA to Screen: ESPHome native API handles this automatically ################################################################################ input_button: emma_reset_chores: name: "Reset Emma's Chores" icon: mdi:restart liam_reset_chores: name: "Reset Liam's Chores" icon: mdi:restart zoe_reset_chores: name: "Reset Zoe's Chores" icon: mdi:restart reset_all_chores: name: "Reset All Chores" icon: mdi:restart-alert template: - sensor: - name: "Emma Chores Done Today" unique_id: emma_chores_done_today icon: mdi:check-circle state: > {% set chores = [states('switch.chore_tracker_emma_make_bed'), states('switch.chore_tracker_emma_brush_teeth'), states('switch.chore_tracker_emma_tidy_room'), states('switch.chore_tracker_emma_homework'), states('switch.chore_tracker_emma_feed_dog')] %} {{ chores | select('equalto', 'on') | list | count }} - name: "Emma All Chores Done" unique_id: emma_all_chores_done icon: mdi:check-all state: > {{ states('sensor.emma_chores_done_today') | int == 5 }} - name: "Liam Chores Done Today" unique_id: liam_chores_done_today icon: mdi:check-circle state: > {% set chores = [states('switch.chore_tracker_liam_make_bed'), states('switch.chore_tracker_liam_brush_teeth'), states('switch.chore_tracker_liam_set_table'), states('switch.chore_tracker_liam_take_out_trash')] %} {{ chores | select('equalto', 'on') | list | count }} - name: "Liam All Chores Done" unique_id: liam_all_chores_done icon: mdi:check-all state: > {{ states('sensor.liam_chores_done_today') | int == 4 }} - name: "Zoe Chores Done Today" unique_id: zoe_chores_done_today icon: mdi:check-circle state: > {% set chores = [states('switch.chore_tracker_zoe_make_bed'), states('switch.chore_tracker_zoe_brush_teeth'), states('switch.chore_tracker_zoe_water_plants'), states('switch.chore_tracker_zoe_homework'), states('switch.chore_tracker_zoe_tidy_room'), states('switch.chore_tracker_zoe_practice_piano')] %} {{ chores | select('equalto', 'on') | list | count }} - name: "Zoe All Chores Done" unique_id: zoe_all_chores_done icon: mdi:check-all state: > {{ states('sensor.zoe_chores_done_today') | int == 6 }} automation: - id: emma_reset_from_ha alias: "Chore Tracker - Reset Emma's chores from HA" trigger: - platform: state entity_id: input_button.emma_reset_chores action: - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_tidy_room - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_homework - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_feed_dog - id: liam_reset_from_ha alias: "Chore Tracker - Reset Liam's chores from HA" trigger: - platform: state entity_id: input_button.liam_reset_chores action: - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_set_table - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_take_out_trash - id: zoe_reset_from_ha alias: "Chore Tracker - Reset Zoe's chores from HA" trigger: - platform: state entity_id: input_button.zoe_reset_chores action: - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_water_plants - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_homework - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_tidy_room - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_practice_piano - id: reset_all_from_ha alias: "Chore Tracker - Reset ALL chores from HA" trigger: - platform: state entity_id: input_button.reset_all_chores action: - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_tidy_room - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_homework - service: switch.turn_off target: entity_id: switch.chore_tracker_emma_feed_dog - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_set_table - service: switch.turn_off target: entity_id: switch.chore_tracker_liam_take_out_trash - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_make_bed - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_brush_teeth - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_water_plants - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_homework - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_tidy_room - service: switch.turn_off target: entity_id: switch.chore_tracker_zoe_practice_piano - id: emma_all_done_notify alias: "Chore Tracker - Emma all done!" trigger: - platform: state entity_id: sensor.emma_all_chores_done to: "True" action: - service: notify.notify data: title: "Emma finished all chores!" message: "Emma completed all 5 chores today!" - id: liam_all_done_notify alias: "Chore Tracker - Liam all done!" trigger: - platform: state entity_id: sensor.liam_all_chores_done to: "True" action: - service: notify.notify data: title: "Liam finished all chores!" message: "Liam completed all 4 chores today!" - id: zoe_all_done_notify alias: "Chore Tracker - Zoe all done!" trigger: - platform: state entity_id: sensor.zoe_all_chores_done to: "True" action: - service: notify.notify data: title: "Zoe finished all chores!" message: "Zoe completed all 6 chores today!" - id: chore_reminder_evening alias: "Chore Tracker - Evening reminder" trigger: - platform: time at: "18:00:00" action: - if: condition: template value_template: "{{ states('sensor.emma_all_chores_done') != 'True' }}" then: - service: notify.notify data: title: "Emma has unfinished chores" message: > Emma has done {{ states('sensor.emma_chores_done_today') }}/5 chores today. - if: condition: template value_template: "{{ states('sensor.liam_all_chores_done') != 'True' }}" then: - service: notify.notify data: title: "Liam has unfinished chores" message: > Liam has done {{ states('sensor.liam_chores_done_today') }}/4 chores today. - if: condition: template value_template: "{{ states('sensor.zoe_all_chores_done') != 'True' }}" then: - service: notify.notify data: title: "Zoe has unfinished chores" message: > Zoe has done {{ states('sensor.zoe_chores_done_today') }}/6 chores today.