Universal timer with a set reset time or reset at 00:01 (daily reset)

Github Repo

Ich habe einen Blueprint für einen Timer,
der in meinem Fall einen Teichpumpenautomatik steuert. Er wird in diesem fall zur Laufzeitbegrenzung eingesetzt
Automatik start Timer - Timer ist z.b. auf 5 Stunden gesetzt nach Ablauf der zeit wird Teichpumpenautomatik gesperrt und der Timer wird entweder zur eingestelleten Zeit oder Standard (00:01) Tagesreset zurückgesetzt

Es werden passende Helper benötigt
z.B. in meine Fall

input_boolean.teich_timer_start
input_boolean.teich_timer_stop
input_boolean.teich_timer_running
input_boolean.teich_timer_done

dadurch kann man den Blueprint mehrfach verwenden

Dann Zuordnung im Blueprint:

Start Trigger → :point_right: input_boolean.teich_timer_start
Stop Trigger → :point_right: input_boolean.teich_timer_stop
Running → :point_right: input_boolean.teich_timer_running
Done → :point_right: input_boolean.teich_timer_done
Dauer → :point_right: “05:00:00”

:fire: Features
:stopwatch: Zeitformat hh:mm:ss
:arrow_forward: Start (Taster)
:stop_button: Stop (optional)
:repeat: Restart-safe (mode: restart)
:satellite: Status running
:dart: Ergebnis done
:crescent_moon: Reset-Zeit frei einstellbar
:brain: Fallback → 00:01:00 wenn leer
:jigsaw: Multi-Instance safe
:shield: Race-Condition geschützt
:no_bell: Trigger Auto-Reset
:zap: Stop während Laufzeit möglich

I have a blueprint for a timer,
which, in my case, controls an automatic pond pump. In this instance, it is used to limit the running time
Automatic start timer – the timer is set to 5 hours, for example; once the time has elapsed, the automatic pond pump is disabled and the timer is reset either at the set time or at the standard (00:01) daily reset

Suitable helpers are required
e.g. in my case

input_boolean.teich_timer_start
input_boolean.teich_timer_stop
input_boolean.teich_timer_running
input_boolean.teich_timer_done

This allows the blueprint to be used multiple times

Then mapping in the blueprint:

Start Trigger → :point_right: input_boolean.teich_timer_start
Stop Trigger → :point_right: input_boolean.teich_timer_stop
Running → :point_right: input_boolean.teich_timer_running
Done → :point_right: input_boolean.teich_timer_done
Duration → :point_right: ‘05:00:00’

:fire: Features
:stopwatch: Time format hh:mm:ss
:arrow_forward: Start (button)
:stop_button: Stop (optional)
:repeat: Restart-safe (mode: restart)
:satellite: Status: running
:dart: Result: done
:crescent_moon: Reset time freely adjustable
:brain: Fallback → 00:01:00 if empty
:jigsaw: Multi-instance safe
:shield: Race condition protected
:no_bell: Trigger auto-reset
:zap: Stop possible during runtime

Translated with DeepL.com (free version)

blueprint:
  name: V3 Ultimate Timer (Multi-Instance, Reset flexibel)
  description: >
    Universeller Timer mit Start/Stop, Status, Ergebnis und frei definierbarer Reset-Zeit.
    Multi-Instance fähig und robust gegen Race Conditions.
  domain: automation

  input:
    start_trigger:
      name: Start Trigger (Taster)
      selector:
        entity:
          domain: input_boolean

    stop_trigger:
      name: Stop Trigger (optional)
      selector:
        entity:
          domain: input_boolean

    duration:
      name: Laufzeit (hh:mm:ss)
      default: "00:05:00"
      selector:
        text: {}

    target_boolean:
      name: Ergebnis (DONE)
      selector:
        entity:
          domain: input_boolean

    running_boolean:
      name: Status (RUNNING)
      selector:
        entity:
          domain: input_boolean

    reset_time:
      name: Reset Zeit (hh:mm:ss)
      description: Leer lassen für Standard 00:01:00
      default: ""
      selector:
        text: {}

mode: restart
max_exceeded: silent

variables:
  reset_time_final: >
    {% if (reset_time | string | length) > 0 %}
      {{ reset_time }}
    {% else %}
      00:01:00
    {% endif %}

trigger:
  - id: start
    platform: state
    entity_id: !input start_trigger
    to: "on"

  - id: stop
    platform: state
    entity_id: !input stop_trigger
    to: "on"

  - id: reset
    platform: template
    value_template: >
      {{ now().strftime('%H:%M:%S') == reset_time_final }}

condition: []

action:
  - choose:

      # 🌙 FLEX RESET
      - conditions:
          - condition: trigger
            id: reset
        sequence:
          - service: input_boolean.turn_off
            target:
              entity_id:
                - !input target_boolean
                - !input running_boolean

      # ⏹️ STOP
      - conditions:
          - condition: trigger
            id: stop
        sequence:
          - service: input_boolean.turn_off
            target:
              entity_id:
                - !input running_boolean
                - !input stop_trigger

      # ▶️ START
      - conditions:
          - condition: trigger
            id: start
        sequence:

          # Start zurücksetzen (Tasterverhalten)
          - service: input_boolean.turn_off
            target:
              entity_id: !input start_trigger

          # Status setzen
          - service: input_boolean.turn_on
            target:
              entity_id: !input running_boolean

          # Ergebnis zurücksetzen
          - service: input_boolean.turn_off
            target:
              entity_id: !input target_boolean

          # Warten oder Stop
          - wait_for_trigger:
              - platform: state
                entity_id: !input stop_trigger
                to: "on"
            timeout: !input duration
            continue_on_timeout: true

          - choose:

              # ⏹️ STOP erkannt
              - conditions:
                  - condition: state
                    entity_id: !input stop_trigger
                    state: "on"
                sequence:
                  - service: input_boolean.turn_off
                    target:
                      entity_id:
                        - !input running_boolean
                        - !input stop_trigger

              # ⏱️ TIMER FERTIG
              - conditions: []
                sequence:
                  - service: input_boolean.turn_on
                    target:
                      entity_id: !input target_boolean

                  - service: input_boolean.turn_off
                    target:
                      entity_id: !input running_boolean

                  # Start sicher zurücksetzen
                  - service: input_boolean.turn_off
                    target:
                      entity_id: !input start_trigger

Code translated for Community

blueprint:
  name: Ultimate Timer V3 (Multi-Instance, Flexible Reset)
  description: >
    Universal and reusable timer blueprint with start/stop control,
    running state, completion state, and configurable daily reset time.
    Designed for multi-instance usage and robust against race conditions.
  domain: automation

  input:
    start_entity:
      name: Start Trigger (Button)
      description: Entity used to start the timer (momentary button behavior recommended)
      selector:
        entity:
          domain: input_boolean

    stop_entity:
      name: Stop Trigger (Optional)
      description: Entity used to stop the timer before completion
      selector:
        entity:
          domain: input_boolean

    duration:
      name: Duration (hh:mm:ss)
      description: Timer duration in hh:mm:ss format
      default: "00:05:00"
      selector:
        text: {}

    done_entity:
      name: Completion State (DONE)
      description: Will be turned ON when the timer finishes
      selector:
        entity:
          domain: input_boolean

    running_entity:
      name: Running State (RUNNING)
      description: Indicates if the timer is currently active
      selector:
        entity:
          domain: input_boolean

    reset_time:
      name: Daily Reset Time (hh:mm:ss)
      description: Time when states are reset daily. Leave empty for default (00:01:00)
      default: ""
      selector:
        text: {}

mode: restart
max_exceeded: silent

variables:
  reset_time_final: >
    {% if (reset_time | string | length) > 0 %}
      {{ reset_time }}
    {% else %}
      00:01:00
    {% endif %}

trigger:
  - id: start
    platform: state
    entity_id: !input start_entity
    to: "on"

  - id: stop
    platform: state
    entity_id: !input stop_entity
    to: "on"

  - id: reset
    platform: template
    value_template: >
      {{ now().strftime('%H:%M:%S') == reset_time_final }}

condition: []

action:
  - choose:

      # 🌙 DAILY RESET
      - conditions:
          - condition: trigger
            id: reset
        sequence:
          - service: input_boolean.turn_off
            target:
              entity_id:
                - !input done_entity
                - !input running_entity

      # ⏹️ STOP HANDLING
      - conditions:
          - condition: trigger
            id: stop
        sequence:
          - service: input_boolean.turn_off
            target:
              entity_id:
                - !input running_entity
                - !input stop_entity

      # ▶️ START HANDLING
      - conditions:
          - condition: trigger
            id: start
        sequence:

          # Reset start trigger (momentary button behavior)
          - service: input_boolean.turn_off
            target:
              entity_id: !input start_entity

          # Set running state
          - service: input_boolean.turn_on
            target:
              entity_id: !input running_entity

          # Reset completion state
          - service: input_boolean.turn_off
            target:
              entity_id: !input done_entity

          # Wait for stop or timeout
          - wait_for_trigger:
              - platform: state
                entity_id: !input stop_entity
                to: "on"
            timeout: !input duration
            continue_on_timeout: true

          - choose:

              # ⏹️ STOP detected
              - conditions:
                  - condition: state
                    entity_id: !input stop_entity
                    state: "on"
                sequence:
                  - service: input_boolean.turn_off
                    target:
                      entity_id:
                        - !input running_entity
                        - !input stop_entity

              # ⏱️ TIMER COMPLETED
              - conditions: []
                sequence:
                  - service: input_boolean.turn_on
                    target:
                      entity_id: !input done_entity

                  - service: input_boolean.turn_off
                    target:
                      entity_id: !input running_entity

                  # Ensure start trigger is reset
                  - service: input_boolean.turn_off
                    target:
                      entity_id: !input start_entity

Hello rockbaer2007,

Thanks for contributing to the community with a new Blueprint.
I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.
Adding a MY link for this Blueprint to your top post would help them a lot.
Here is the link to make that.
Create a link – My Home Assistant

Installation link on GitHub

1 Like

Ich habe eine neue Version V3.2 erstellt die mit Helpern oder mit per MQTT erzeugten Entitäten funktioniert. Mit MQTT Version ist ähnlich der Funktion von IOBroker Datenpunkt erzeugen für scripte.

Gruß rockbaer

I have created a new version, V3.2, which works with helpers or with entities generated via MQTT. The MQTT version works in a similar way to the IOBroker function for generating data points for scripts.

Regards, rockbaer

:stopwatch: Ultimate Timer V3.2.4 – Reliable Multi-Instance Timer Blueprint (Helper + MQTT)

Hi all :waving_hand:

I’d like to share my Ultimate Timer Blueprint, designed for real-world automations like pumps, irrigation, watchdogs and delayed actions.


:rocket: What makes it different?

This is not just a simple timer – it’s built to be robust and production-ready:

  • :white_check_mark: Reliable STOP handling (instant, no glitches)
  • :white_check_mark: RUNNING state never gets stuck
  • :white_check_mark: DONE stays ON until reset
  • :white_check_mark: Multi-instance safe
  • :white_check_mark: Works with Helpers or MQTT
  • :white_check_mark: No race conditions

Preview variants and Demo on Github

:light_bulb: Use Cases

  • Pool / pond pump runtime limiter
  • Irrigation systems
  • Watchdog automations
  • Delayed shutdowns
  • General automation timing

:package: Installation

:backhand_index_pointing_right: One-click import:


:counterclockwise_arrows_button: Why I built this

I needed a timer that:

  • doesn’t break with parallel automations
  • handles STOP reliably
  • works across multiple independent setups

The built-in HA timer didn’t fully fit these needs – so I built this.


:star: Feedback welcome!

Let me know what you think or if you have ideas for improvements :+1: