github eyalgal/simple-timer-card v1.3.2
v1.3.2 - Timestamp Duration, Expiry UX & Audio Improvements

latest releases: v2.9.0, v2.8.0, v2.7.4...
12 months ago

What's New

  • Timestamp timers: Now support duration/progress bar using a configurable start_time_attr (template sensor recommended, see below and #35)
  • Expiry actions: expire_action: keep, dismiss, or remove now behave consistently for all timer types, and read-only timers now show a Dismiss button
  • Audio UX: New audio_completion_delay (default 4s) ensures timer audio finishes before removal/dismissal (#36)
  • Docs: Expanded template sensor examples for timestamp timers, clearer Voice PE and entity config docs

Template Sensors for Timestamp Timers (Expanded)

To show a progress bar for a timestamp-based timer, you need both an end time (the entity state) and a valid start_time attribute.
Every device and integration is different - it's up to you to create the logic that accurately tracks the start_time and end_time for your needs.

Basic Example (two sensors):

template:
  - sensor:
      - name: "Dishwasher Timer"
        state: "{{ states('sensor.dishwasher_finish') }}"
        attributes:
          start_time: "{{ states('sensor.dishwasher_start') }}"

Advanced Example (trigger-based for Samsung Dryer I personally use):

template:
  - trigger:
      - platform: state
        entity_id: sensor.dryer_status
        to: 'running'
        id: started
      - platform: state
        entity_id: sensor.dryer_dryer_completion_time
        id: eta_changed
      - platform: state
        entity_id: sensor.dryer_status
        from: 'running'
        to: ~
        id: stopped 
    sensor:
      - name: Dryer Progress Timer
        device_class: timestamp
        state: >-
          {% set eta = states('sensor.dryer_dryer_completion_time') %}
          {% if eta in ['unknown','unavailable','none',''] %}
            {{ this.state | default('') }}
          {% else %}
            {{ eta }}
          {% endif %}
        attributes:
          start_time: >-
            {% if trigger.id == 'started' %}
              {{ now().isoformat() }}
            {% elif trigger.id == 'eta_changed' %}
              {{ this.attributes.start_time | default(now().isoformat()) }}
            {% elif trigger.id == 'stopped' %}
              {{ '' }}
            {% else %}
              {{ this.attributes.start_time | default('') }}
            {% endif %}
        availability: >-
          {{ states('sensor.dryer_dryer_completion_time') not in ['unknown','unavailable','none',''] }}
  • Tip: Use triggers and conditions that match your device's actual cycle, so the start_time is set when the timer starts and cleared when it stops.
  • You must adapt this logic for your own device! Some integrations may have a simple start and finish sensor, others require more state tracking or template triggers.

Don't miss a new simple-timer-card release

NewReleases is sending notifications on new releases.