Home Assistant Guide

Simple tutorials for powerful automations

Trash Reminder in Home Assistant (Repeating Mode)

This Home Assistant blueprint automatically reminds you to put out the bins the evening before collection. It’s designed for people whose bin schedule repeats on a fixed cycle — for example, every 7 or 14 days — and it can optionally announce reminders on smart speakers or keep repeating notifications until you confirm you’ve taken out the trash.

What Does This Blueprint Do?

This automation will:

  • Send a reminder notification to your phone or tablet via the Home Assistant Companion App.
  • Work on a simple repeating schedule, such as every 7 days or every 14 days starting from your chosen date.
  • Let you choose a specific reminder time (e.g., 8:00 PM) the day before collection.
  • Optionally announce the reminder aloud through any TTS-enabled smart speakers.
  • Optionally keep reminding you until you press your “Trash Put Outside” button or tap “Done” in the notification.
  • Automatically skip the reminder if you’ve already pressed the button within the last 24 hours (so it doesn’t nag you twice).

How to Use This Blueprint

Note: You can import this blueprint from any device, but notifications and repeating reminders require the Home Assistant Companion App on Android or iOS with notification permissions enabled.

  1. Import the Blueprint
    Click the Import Blueprint button/link at the top of this article.
    — If prompted in Home Assistant, review the YAML preview and click Import.
    Alternative (manual): In Home Assistant go to Settings > Automations & Scenes > Blueprints, click Import Blueprint, paste the blueprint’s raw YAML URL, and click Preview > Import.
  2. Create an Automation from the Blueprint
    After import, find “Trash Reminder (Repeating Mode)” under Settings > Automations & Scenes > Blueprints and click Create Automation.
  3. Fill in the Inputs
    • First Pickup Date: The date of an upcoming collection day — this sets the repeating schedule baseline.
    • Repeat Every N Days: How often bins are collected (e.g., 7 for weekly or 14 for fortnightly).
    • Reminder Time: The time of day you want the reminder the evening before collection.
    • Device to Notify: Select your phone or tablet (requires the Companion App). Leave blank if you’ll use a custom notify service.
    • Notify Service (optional): To notify multiple people, enter a service such as notify.family_phones.
    • “Trash Put Outside” Button (optional): Choose an input_button entity if you want the reminder to repeat until confirmed.
    • TTS Engine & Speakers: (Optional) Select a TTS engine (like Piper or Google Cloud TTS) and one or more speakers to announce the reminder aloud.
    • Reminder Message: The text shown in the notification and read aloud by TTS.
    • Re-notify Every (Minutes): How often to resend reminders if unacknowledged (applies only when a button is set).
    • Suppress if Pressed Within (Hours): Prevents duplicate notifications if the “Trash Put Outside” button was pressed recently.
  4. Save
    Click Save. The automation will now run automatically at your chosen reminder time before each scheduled collection.

Use Cases & Ideas

  • Weekly or fortnightly bin and recycling reminders.
  • Alternate-week compost or garden waste collections.
  • Simple repeating tasks like watering plants or feeding pets.
  • Maintenance reminders such as cleaning filters, topping up salt, etc.

Blueprint YAML


blueprint:
  name: "Trash Reminder (Repeating Mode — device or notify service)"
  description: >
    Reminds you the evening before each pickup on a simple repeating schedule
    (e.g., every 14 days starting from a given date). Choose either a single
    mobile_app device (UI-friendly) or a notify service (e.g., notify.family_phones)
    to reach multiple phones. Includes optional TTS, optional nag-until-done
    with an input_button, and suppression if the button was pressed recently.
  domain: automation

  input:
    repeating_start_date:
      name: "First pickup date"
      description: "The date of an actual pickup day (local date)."
      selector:
        date: {}

    repeating_every_days:
      name: "Repeat every N days"
      description: "Example: 14 for fortnightly."
      default: 14
      selector:
        number:
          min: 1
          mode: box
          unit_of_measurement: days

    repeating_reminder_time:
      name: "Reminder time"
      description: "Time to send the reminder on the day before each pickup."
      default: "20:00:00"
      selector:
        time: {}

    # ---- Choose either a single device, or a notify service (for multiple phones) ----
    notify_device:
      name: "Device to notify (single)"
      description: "Mobile App device. Leave empty if you use a notify service/group."
      default: null
      selector:
        device:
          integration: mobile_app

    notify_service:
      name: "Notify service (optional)"
      description: "Service like notify.family_phones or notify.mobile_app_your_phone."
      default: ""
      selector:
        text:
          multiline: false

    # ---- Confirmation button (optional) ----
    bin_put_outside_button:
      name: "“Trash put outside” button (optional)"
      description: "Select to enable nag-until-done; leave empty to send a single reminder."
      default: null
      selector:
        entity:
          filter:
            domain: input_button

    # ---- TTS (optional) ----
    tts_entity:
      name: "TTS engine (optional)"
      description: "A TTS entity (e.g., Piper/Google Cloud TTS). Leave empty to skip TTS."
      default: null
      selector:
        entity:
          filter:
            domain: tts
          multiple: false

    tts_media_players:
      name: "Speakers to announce on (optional)"
      description: "Media players to play the TTS announcement."
      default: []
      selector:
        entity:
          multiple: true
          filter:
            domain: media_player

    # ---- Message text ----
    reminder_message:
      name: "Reminder message"
      description: "Used for both push notifications and TTS (if enabled)."
      default: "Reminder: put the trash outside."
      selector:
        text:
          multiline: false

    # ---- Behaviour tweaks ----
    repeat_interval_minutes:
      name: "Re-notify every (minutes)"
      description: "How often to re-notify until acknowledged/pressed (if button selected)."
      default: 30
      selector:
        number:
          min: 5
          max: 180
          step: 5
          mode: slider
          unit_of_measurement: minutes

    require_acknowledge:
      name: "Require acknowledgement"
      description: "If enabled and a button is selected, keeps reminding until you tap “Done” or press the button."
      default: true
      selector:
        boolean: {}

    suppress_hours:
      name: "Suppress if button was pressed within (hours)"
      description: "Skip sending if the button was pressed within this many hours."
      default: 24
      selector:
        number:
          min: 1
          max: 72
          step: 1
          mode: slider
          unit_of_measurement: hours

mode: single
max_exceeded: silent

variables:
  v_start_date: !input repeating_start_date
  v_every_days: !input repeating_every_days
  v_time: !input repeating_reminder_time

  v_device: !input notify_device
  v_notify_service: !input notify_service
  v_msg: !input reminder_message

  v_button: !input bin_put_outside_button
  v_tts: !input tts_entity
  v_players: !input tts_media_players

  v_repeat_min: !input repeat_interval_minutes
  v_require_ack: !input require_acknowledge
  v_suppress_h: !input suppress_hours

  v_have_service: "{{ (v_notify_service | default('') | trim) != '' }}"
  v_have_device: "{{ v_device is not none and v_device != '' }}"
  v_require_ack_eff: "{{ v_require_ack and v_button is not none and v_button != '' }}"

trigger:
  - platform: time
    at: !input repeating_reminder_time

# Only run at the chosen time if TOMORROW is a pickup day
condition:
  - condition: template
    value_template: >
      {% set start = v_start_date %}
      {% if not start or not v_every_days %}
        false
      {% else %}
        {% set today = now().date() %}
        {% set tomorrow = today + timedelta(days=1) %}
        {% set days = (tomorrow - as_datetime(start).date()).days %}
        {{ days >= 0 and (days % (v_every_days | int) == 0) }}
      {% endif %}

action:
  # Establish run context & suppression (input_button stores its press timestamp in its state)
  - variables:
      run_started: "{{ now() }}"
      ack_cutoff: "{{ now() - timedelta(hours=(v_suppress_h | int)) }}"
      last_press: >-
        {% if v_button %}
          {% set s = states(v_button) %}
          {{ as_datetime(s) if s not in [none, '', 'unknown', 'unavailable'] else none }}
        {% else %}
          {{ none }}
        {% endif %}
      already_done: "{{ last_press is not none and last_press >= ack_cutoff }}"

  # Skip if already done recently
  - condition: template
    value_template: "{{ not already_done }}"

  # Preflight: require either notify service or device
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ not v_have_service and not v_have_device }}"
        sequence:
          - action: persistent_notification.create
            data:
              title: "Trash Reminder: misconfiguration"
              message: "Select a mobile_app device or enter a notify service (e.g., notify.family_phones)."
          - stop: "Stopped: a notify target is required."

  # Repeat cycle: SEND -> (optional TTS) -> WAIT -> loop until ack (if button+require_ack)
  - repeat:
      while: >
        {% if not v_require_ack_eff %}
          false
        {% else %}
          {% if v_button %}
            {% set s = states(v_button) %}
            {% set last = as_datetime(s) if s not in [none,'','unknown','unavailable'] else none %}
          {% else %}
            {% set last = none %}
          {% endif %}
          {{ last is none or last < run_started }}
        {% endif %}
      sequence:
        # --- Send the notification (prefer service if provided) ---
        - choose:
            - conditions:
                - condition: template
                  value_template: "{{ v_have_service }}"
              sequence:
                - action: "{{ v_notify_service }}"
                  data:
                    message: "{{ v_msg }}"
                    data:
                      actions:
                        - action: TRASH-DONE
                          title: "Done"
          default:
            - domain: mobile_app
              type: notify
              device_id: !input notify_device
              message: "{{ v_msg }}"
              data:
                actions:
                  - action: TRASH-DONE
                    title: "Done"

        # --- Optional TTS each cycle ---
        - if: "{{ v_tts and (v_players | count > 0) }}"
          then:
            - action: tts.speak
              target:
                entity_id: !input tts_entity
              data:
                media_player_entity_id: !input tts_media_players
                message: "{{ v_msg }}"

        # --- Wait for acknowledgement (notification action or button press) ---
        - choose:
            - conditions:
                - condition: template
                  value_template: "{{ v_button is not none and v_button != '' }}"
              sequence:
                - wait_for_trigger:
                    - platform: event
                      event_type: mobile_app_notification_action
                      event_data:
                        action: TRASH-DONE
                    - platform: event
                      event_type: input_button_pressed
                      event_data:
                        entity_id: !input bin_put_outside_button
                  timeout:
                    minutes: !input repeat_interval_minutes
                - if: "{{ wait.trigger is not none and wait.trigger.platform == 'event' and wait.trigger.event.event_type == 'mobile_app_notification_action' }}"
                  then:
                    - action: input_button.press
                      target:
                        entity_id: !input bin_put_outside_button
          default:
            - wait_for_trigger:
                - platform: event
                  event_type: mobile_app_notification_action
                  event_data:
                    action: TRASH-DONE
              timeout:
                minutes: !input repeat_interval_minutes

  

Tip: Notify Multiple Phones (UI Method)

If you want to send the reminder to several phones at once, create a Notify Group directly from the Home Assistant UI:

  1. Go to Settings → Devices & Services → Helpers.
  2. Click Create Helper → choose Group.
  3. Select Notify Group.
  4. Give it a name (for example, Family Phones).
  5. Add all the mobile app notify services you want to include.
  6. Save — this will create a new service called notify.family_phones.

You can then enter notify.family_phones in the blueprint’s “Notify service” field to send one message to all devices at once.

Official source: Home Assistant Docs – Group Integration → Notify Group