Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Basic analog clock for Lovelace

NotificationsYou must be signed in to change notification settings

Villhellm/lovelace-clock-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

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

Example

NameTypeRequirementDescription
typestringRequired"custom:clock-card"
time_zonestringOptionalThe timezone you would like to display. If ommited your current device time will be used. Must be a validTZ database name
sizenumberOptionalThe size of the clock in px. Default is 300
font_sizenumberOptionalThe size of the date string in px. Default is 20
disable_secondsbooleanOptionalDisable the seconds hand
show_continentbooleanOptionalDisplay the timezone continent beneath the clock
show_citybooleanOptionalDisplay the timezone city beneath the clock
captionstringOptionalCaption to display under the clock. This will override both show_city and show_continent
display_datestringOptionalDisplay the current Date object. See below for format options
themeobjectOptionalChange the theme colors manually. Theme options below

Display date string format options

StringReturns
aAM/PM
hhcurrent 12/hr hour with leading zero eg:04
hcurrent 12/hr hour eg:4
mmcurrent minute with leading zero eg:09
mcurrent minute eg:9
sscurrent second with leading zero eg:07
scurrent second eg:7
HHcurrent 24/hr hour with leading zero eg:04
Hcurrent 24/hr hour eg:16
YYYYcurrent full year eg:2020
YYcurrent abbreviated year eg:20
MMMMcurrent month name eg:August
MMMcurrent abbreviated month name eg:Aug
MMcurrent month with leading zero eg:08
Mcurrent month eg:8
DDDDcurrent day name eg:Tuesday
DDDcurrent abbreviated day name eg:Tue
DDcurrent day with leading zero eg:06
Dcurrent day eg:6

Theme options

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

NameTypeRequirementDescription
backgroundstringOptionalClock face background color
handsstringOptionalColor of the hands and clock border (ifborder is not defined)
numbersstringOptionalColor of the numbers
borderstringOptionalColor of the clock face border

Example Configuration

-type:"custom:clock-card"time_zone:"America/Chicago"#OPTIONALsize:250#OPTIONALfont_size:100#OPTIONALdisable_seconds:true#OPTIONALcaption:"Corporate"display_date:"MM/DD/YY"theme:background:blackhands:orangenumbers:whiteborder:grey

Troubleshooting

About

Basic analog clock for Lovelace

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp