Giter VIP home page Giter VIP logo

lovelace-clock-card's Introduction

Lovelace Analog Clock Card

A simple analog clock card for Home Assistant. Colors are based on your current theme.

Example

Name Type Requirement Description
type string Required "custom:clock-card"
time_zone string Optional The timezone you would like to display. If ommited your current device time will be used. Must be a valid TZ database name
size number Optional The size of the clock in px. Default is 300
font_size number Optional The size of the date string in px. Default is 20
disable_seconds boolean Optional Disable the seconds hand
show_continent boolean Optional Display the timezone continent beneath the clock
show_city boolean Optional Display the timezone city beneath the clock
caption string Optional Caption to display under the clock. This will override both show_city and show_continent
display_date string Optional Display the current Date object. See below for format options
theme object Optional Change the theme colors manually. Theme options below

Display date string format options

String Returns
a AM/PM
hh current 12/hr hour with leading zero eg: 04
h current 12/hr hour eg: 4
mm current minute with leading zero eg: 09
m current minute eg: 9
ss current second with leading zero eg: 07
s current second eg: 7
HH current 24/hr hour with leading zero eg: 04
H current 24/hr hour eg: 16
YYYY current full year eg: 2020
YY current abbreviated year eg: 20
MMMM current month name eg: August
MMM current abbreviated month name eg: Aug
MM current month with leading zero eg: 08
M current month eg: 8
DDDD current day name eg: Tuesday
DDD current abbreviated day name eg: Tue
DD current day with leading zero eg: 06
D current day eg: 6

Theme options

All theme options can be set with a CSS valid color option.

Name Type Requirement Description
background string Optional Clock face background color
hands string Optional Color of the hands and clock border (if border is not defined)
numbers string Optional Color of the numbers
border string Optional Color of the clock face border

Example Configuration

- type: "custom:clock-card"
  time_zone: "America/Chicago" #OPTIONAL
  size: 250 #OPTIONAL
  font_size: 100 #OPTIONAL
  disable_seconds: true #OPTIONAL
  caption: "Corporate"
  display_date: "MM/DD/YY"
  theme:
    background: black
    hands: orange
    numbers: white
    border: grey

Troubleshooting

lovelace-clock-card's People

Contributors

ktownsend-personal avatar shevu avatar villhellm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.