Home

Awesome

Digital Clock

A custom digital clock card for Home Assistant

GitHub Release hacs_badge License

Image of Digital Clock Card

Options

NameTypeRequirementDescriptionDefault
typestringRequiredcustom:digital-clock
localestringOptionalLocale to use for formatting. For example delocale set in your home assistant profile otherwise your browser locale
timeZonestringOptionalTime zone to use. For example Europe/Berlintime zone set in your home assistant profile otherwise your browser time zone
firstLineFormat | timeFormatobject | stringOptionalFormat of first line{ hour: '2-digit', minute: '2-digit' }
secondLineFormat | dateFormatobject | stringOptionalFormat of second line{ weekday: 'short', day: '2-digit', month: 'short' }

If firstLineFormat respectively secondLineFormat is a string, it can be every format, which is valid in Luxon. See: https://moment.github.io/luxon/#/formatting?id=toformat

If firstLineFormat respectively secondLineFormat is an object, it can be every valid object, which can be passed as options to the Luxon-function toLocalString(). See: https://moment.github.io/luxon/#/formatting?id=tolocalestring-strings-for-humans

If timeFormat is specified, it will override firstLineFormat and dateFormat will override secondLineFormat.

Example

type: 'custom:digital-clock'
dateFormat:
  weekday: 'long'
  day: '2-digit'
  month: 'short'
timeFormat:
  hour: '2-digit'
  minute: '2-digit'