shbatm / lovelace-digital-clock

A custom digital clock card for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Digital Clock

A custom digital clock card for Home Assistant

GitHub Release hacs_badge License

Image of Digital Clock Card

Options

Name Type Requirement Description Default
type string Required custom:digital-clock
locale string Optional Locale to use for formatting. For example de locale set in your home assistant profile otherwise your browser locale
timeZone string Optional Time zone to use. For example Europe/Berlin time zone set in your home assistant profile otherwise your browser time zone
firstLineFormat | timeFormat object | string Optional Format of first line { hour: '2-digit', minute: '2-digit' }
secondLineFormat | dateFormat object | string Optional Format 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'

About

A custom digital clock card for Home Assistant

License:MIT License


Languages

Language:TypeScript 71.7%Language:JavaScript 28.3%