Home Assistant

Coffee machine left-on reminder

After a coffee-machine plug stays on for a set runtime, a Companion notification asks you to keep it on or turn it off. Silence turns it off, and Keep on starts another runtime.

Difficulty · BeginnerSetup · 20–40 minutesHA · current stable (blueprint)
Get the pack · from $19Have us set it up

Some hardware links on this page are affiliate links. As an Amazon Associate I earn from qualifying purchases. We may earn a commission if you buy through them, at no extra cost to you. See the affiliate disclosure.

A coffee machine that is done brewing and still on is a hot plate with nobody watching it. This pack waits until the switch has stayed on for a runtime (pack default 40 minutes), then sends one Companion notification with two buttons. Keep on means you are still using it, and the runtime starts over. Turn off switches it off now. If nobody answers before a timeout (pack default 5 minutes), the pack switches it off and sends a short confirmation.

Entity ids are blueprint inputs (switch.coffee_machine). Do not publish a person’s phone name.

The generic “ask and wait for a reply” script is actionable notification with reply. A plug that turns off after a fixed timer with no question is relay auto-off timer. Washer and dryer cycle alerts are laundry handoff reminders. This one is the left-on question for a switch that should not stay on.

What problem it solves

You want a nudge when the machine has been on long enough, a one-tap way to leave it on for another cup, and an automatic off when the notification is ignored.

How it works

  1. Runtime — the switch changing to on starts a timer helper for the runtime (pack default 40 minutes). The timer is created with restore, so a Home Assistant restart keeps the remaining time. Turning the switch off before the timer finishes cancels the timer and clears a question that is already on the phone. A brew you switch off yourself never asks.
  2. One tag — the question uses a tag (pack default coffee_left_on). The next prompt and the clear action use that tag, so a second morning does not stack banners. The “turned off” confirmation uses a second tag so the clear step does not wipe it. Button action names include the automation context id, so an old notification’s button cannot satisfy a newer wait.
  3. Buttons — Keep on clears the question and starts the runtime timer again. The switch stays on. The next prompt arrives after another full runtime, not immediately. Turn off calls switch.turn_off and clears the question.
  4. Silence — wait_for_trigger on the Companion action event, with a timeout. On timeout the pack turns the switch off, sends a confirmation that it did so, and clears the question banner. The confirmation uses the same tag so it replaces the question instead of sitting under it.
  5. Platforms — Android gets a high-priority channel, a sticky notification, and a short vibration pattern. iOS gets interruption-level: time-sensitive so Focus is less likely to bury a hot-plate reminder. Time Sensitive is a permission on the phone. Until it is allowed, the banner is an ordinary notification. The pack is one blueprint. The payload branches on the phone you picked.
  6. Manual off — if you turn the machine off at the switch during the wait, the off trigger clears the banner and does not send the “turned off automatically” confirmation. That confirmation is only for the timeout and the Turn off button.

Keep on does not extend by a few minutes. It grants another full runtime. If that is too long, lower the runtime input. There is no third button.

Hardware notes

  • Plug. Any switch. The linked plug is a Kasa EP10 four-pack, 15 A, which is enough for a typical drip machine. Read the machine’s nameplate before you put it on a plug. This pack does not need energy monitoring. It watches the switch state. If the machine is switched at the machine and the smart plug stays on, the runtime never starts. The plug has to be what turns the machine on, or the machine has to be a switch Home Assistant can see.
  • Phone. Companion on iOS or Android, notifications allowed. One or more devices can be selected. Each gets the same buttons.
  • No extra sensor. There is no power threshold in this pack. “On” means the switch is on.

Snippet

The pack ships a blueprint. Action names are suffixed with the run id in the full file so two waits cannot collide. The shape is:

mode: restart

trigger:
  - platform: state
    entity_id: !input machine_switch
    to: "on"
    id: started
  - platform: state
    entity_id: !input machine_switch
    to: "off"
    id: manual_off
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: !input runtime_timer
    id: due

action:
  - choose:
      - conditions:
          - condition: trigger
            id: started
        sequence:
          - action: timer.start
            target:
              entity_id: !input runtime_timer
            data:
              duration: !input runtime
      - conditions:
          - condition: trigger
            id: manual_off
        sequence:
          - action: timer.cancel
            target:
              entity_id: !input runtime_timer
          - action: notify.send_message
            target:
              entity_id: !input notify_target
            data:
              message: clear_notification
              data:
                tag: !input notification_tag
      - conditions:
          - condition: trigger
            id: due
        sequence:
          - action: notify.send_message
            target:
              entity_id: !input notify_target
            data:
              title: "Coffee machine still on"
              message: "Keep it on, or turn it off."
              data:
                tag: !input notification_tag
                actions:
                  - action: "KEEP_ON"
                    title: "Keep on"
                  - action: "TURN_OFF"
                    title: "Turn off"
          - wait_for_trigger:
              - platform: event
                event_type: mobile_app_notification_action
                event_data:
                  action: "KEEP_ON"
                  tag: !input notification_tag
              - platform: event
                event_type: mobile_app_notification_action
                event_data:
                  action: "TURN_OFF"
                  tag: !input notification_tag
            timeout: !input response_timeout
            continue_on_timeout: true
          - choose:
              - conditions:
                  - condition: template
                    value_template: "{{ wait.trigger is not none and wait.trigger.event.data.action == 'KEEP_ON' }}"
                sequence:
                  - action: timer.start
                    target:
                      entity_id: !input runtime_timer
                    data:
                      duration: !input runtime
                  - action: notify.send_message
                    target:
                      entity_id: !input notify_target
                    data:
                      message: clear_notification
                      data:
                        tag: !input notification_tag
            default:
              - action: switch.turn_off
                target:
                  entity_id: !input machine_switch

The iOS interruption level and the Android channel are added in the full blueprint from the phone input. The default branch is both the Turn off button and the timeout. The confirmation after an automatic off uses a second tag, so the manual-off clear does not remove it.

Setup outline

  1. Plug the machine into the smart plug and turn it on from Home Assistant. Confirm the switch entity is the thing that actually cuts the machine.
  2. Import the blueprint. Select the switch, the phones, a 40 minute runtime, and a 5 minute reply timeout. Set the tag if you already use coffee_left_on for something else.
  3. Temporarily set the runtime to one minute. Turn the switch on, wait for the banner, and tap Turn off. The switch should go off and the banner should clear.
  4. Turn it on again. Tap Keep on. The banner clears, the switch stays on, and a new banner arrives after another runtime.
  5. Turn it on again. Do not tap. After the reply timeout the switch should turn off and a confirmation should replace the question. Put the runtime back to 40 minutes.

Troubleshooting

  • No banner. Companion notifications are off, or the notify target is a phone that is signed out. Send a plain notify to that target before you blame the runtime.
  • Buttons do nothing. The event action name does not match, often because a tag or a context suffix was added on the send and not on the wait. The pack uses one tag variable for both.
  • Keep on immediately asks again. The runtime timer duration is short, or Keep on is restarting a timer of a few seconds. The pack starts a full runtime on that button. If a second automation is pulsing the switch, each pulse starts the timer over. This pack leaves the switch on for Keep on.
  • Timeout never turns it off. continue_on_timeout is false, so the wait stops the automation, or another automation with mode: single is still inside an older wait. Use restart, and allow the timeout branch to run.
  • The machine stays hot with the plug off. The machine’s own switch is downstream of a plug that is not in the circuit you think it is, or the machine is on a second outlet. Check the nameplate outlet.
  • iOS stays quiet overnight. Time Sensitive permission is off. The pack sets the interruption level. The phone still has to allow it.
  • Android channel is silent. Channel importance sticks the first time that channel name is used. A new tag’s channel name is how you get a fresh importance. The pack default channel matches the tag.

Credits

Based on the community blueprint Coffee Machine Reminder — iOS and Android and the home-assistant-blueprints project. This write-up is an original overview of the runtime prompt, the silence-to-off path, and a Keep on that arms another full runtime. It is not a paste of that blueprint.

Changelog

v1.0 · Oct 26, 2026: First publish.