Skip to content

sopelj/lovelace-kanji-clock-card

Repository files navigation

Kanji Clock Card by @sopelj

GitHub Release License hacs_badge Project Maintenance

A simple clock widget using Japanese Kanji for time and date

Example

Options

Name Type Requirement Description Default
type string Required custom:kanji-clock-card
use_24h boolean Optional Use 24 hour clock false
invert_date boolean optional Use d日m月Y年 instead of the standard Y年m月d日 false
short_weekdays boolean Optional Abbreviate weekdays to single kanji true
kanji_numbers boolean Optional Convert numbers to kanji false

Installation with Hacs

- url: /hacsfiles/lovelace-kanji-clock-card/kanji-clock-card.js
  type: module

Troubleshooting

Font displayed incorrectly

Please be sure you have a font that can display Kanji. I set it to use 'Sarasa UI J', 'Noto Sans JP', Helvetica then Arial in that order. You can customize the font (or any other style for that matter) with the Card Mod if you wish.

Time is incorrect on Firefox

If your time is displaying incorrectly on Firefox, you may have fingerprinting disable, see associated issue.

Development

Clone the repo and run yarn install or npm install.

You can then run yarn dev to build and serve the files. You can then add the development card by adding the following to your lovelace config. (Replacing IP_ADDRESS with the IP of the computer on which you're running the command) You may need to temporarily allow loading of mixed resources if you are testing on a site with HTTPS

- url: http://localhost:5000/kanji-clock-card.js
  type: module

You can then use yarn lint and then yarn build