Skip to content

Custom countdown timer card for Home Assistant with Lovelace

License

Notifications You must be signed in to change notification settings

ejpenney/countdown-timer-card

Repository files navigation

Countdown Timer Card by @ejpenney

GitHub Release License hacs_badge

Project Maintenance GitHub Activity

Discord Community Forum

A simple card for displaying the amount of time till or since some date/time.

Support

Hey dude! Help me out for a couple of 🍻 or a ☕!

coffee

Options

Name Type Scope Requirement Description Default
type string Global Only Required custom:countdown-timer-card
name string Global/timers Required Timer Name
deadline string Global/timers Required Date/Time string as documented here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date_time_string_format
timers list Global Only Optional One of [all next last] Shows only most recent or nearest upcoming all
showOnly string Global/timers Optional One of [all next last] Shows only most recent or nearest upcoming all
showSmallest string Global/timers Optional One of [days weeks hours minutes seconds] Sets smallest time unit to be displayed minutes
showLargest string Global/timers Optional One of [days weeks hours minutes seconds] Sets largest time unit to be displayed if showClock is true, hours else weeks
alwaysShow boolean Global/timers Optional Forces a timer to be displayed even if it would be filtered by showOnly false
showClock boolean Global/timers Optional Display times as a clock, like HH:MM:SS false
entity string Global/timers Optional Home Assistant entity ID to retrieve the date/time from. none
attribute string Global/timers Optional Requires entity Home Assistant specified attribute of Home Assistant entity to get date from. none
tap_action object Optional Action to take on tap action: more-info
hold_action object Optional Action to take on hold none
double_tap_action object Optional Action to take on double tap none
show_error boolean Global Only Optional Show what an error looks like for the card false
show_warning boolean Global Only Optional Show what a warning looks like for the card false

Action Options

Name Type Requirement Description Default
action string Required Action to perform (more-info, toggle, call-service, navigate url, none) more-info
navigation_path string Optional Path to navigate to (e.g. /lovelace/0/) when action defined as navigate none
url string Optional URL to open on click when action is url. The URL will open in a new tab none
service string Optional Service to call (e.g. media_player.media_play_pause) when action defined as call-service none
service_data object Optional Service data to include (e.g. entity_id: media_player.bedroom) when action defined as call-service none
haptic string Optional Haptic feedback for the Beta IOS App success, warning, failure, light, medium, heavy, selection none
repeat number Optional How often to repeat the hold_action in milliseconds. non

Creating a new countdown-timer-card

Preview

type: custom:countdown-timer-card
title: Solstices
showLargest: Hour
timers:
  - name: Summer Solstice
    deadline: June 21 %Y 20:31:00 GMT-0700
    showLargest: weeks
  - name: Winter Solstice
    deadline: December 21, %Y 07:58:00 GMT-0700
    showSmallest: days
  - name: Sunset
    entity: sun.sun
    attribute: next_setting
    showClock: true
  - name: Two Weeks
    deadline: '2021-07-27'
    showSmallest: days
  - name: Breakfast
    deadline: '%Y-%M-%DT08:30:00'
  - name: Dinner
    deadline: '%Y-%M-%DT17:30:00'
  - name: Today
    deadline: '%Y/%M/%D'

Preview

type: custom:countdown-timer-card
showOnly: next
timers:
  - deadline: July 1 2021 16:30:00 GMT-0700
    name: Sabbatical
    alwaysShow: true
  - name: Christmas
    deadline: December 25, %Y

About

Custom countdown timer card for Home Assistant with Lovelace

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published