Giter Site home page Giter Site logo

simple-clock-card's Introduction

hacs_badge

simple-clock-card

A text based simple clock for people who use Home Assistant on a panel

Based on https://github.com/arjhun/Homeassistant-Lovelace-Cards @arjhun

24h clock

military without seconds

Installation:

Follow only one of these installation methods.

Installation and tracking with HACS:
  1. You can install this custom component by adding this repository (https://github.com/fufar/simple-clock-card) to HACS in the settings menu of HACS first. You will find the custom component in the integration menu afterwards, look for 'Simple Clock Card'.

  2. Set the lovelace panel

Manual installation:
  1. Copy simple-clock-card.js into your 'www' folder in the hass config directory. The 'www' folder can be accesed via '/local/' in your configuration I've put my custom elements in the sub folder 'elements' and the js file of this card in the folder 'simple-clock-card' as an example.

  2. Enable advanced mode and in your lovelace dashboard settings

  3. Add a resource add a resource

    or if you use yaml to configure lovelace:

     resources:
     	- type: module
         	  url: /hacsfiles/elements/simple-clock-card/simple-clock-card.js
    
  4. Set the lovelace panel

Set lovelace panel

Add the following lines to a view in 'cards:' as a 'manual card' or use your yaml configuration and add:

	- type: 'custom:simple-clock-card'

Options

option default description
use_military true When true shows a 24h format clock instead of a 12h format clock with AM/ PM
hide_seconds false When true hides the seconds
bold_clock false When true makes the clock bold
font_size 4rem Size of the font in rem. Units of measurement is required
lead_zero false When true adds a leading 0 to hours e.g. 04:28
paddingLeft_size 0px Size of the lovelace field in px. Units of measurement is required
paddingRight_size 0px Size of the lovelace field in px. Units of measurement is required
paddingTop_size 60px Size of the lovelace field in px. Units of measurement is required
paddingBottom_size 60px Size of the lovelace field in px. Units of measurement is required

Example

  • show a 24h clock with seconds:

      - type: 'custom:simple-clock-card'
        use_military: true
        hide_seconds: false
        bold_clock: false
        font_size: 6rem
        paddingLeft_size: 32px
        paddingRight_size: 32px
        paddingTop_size: 32px
        paddingBottom_size: 32px
    

Original author: github.com/arjhun

simple-clock-card's People

Contributors

bessarabov avatar bre77 avatar fufar avatar geekdoc avatar henrydparker avatar krupaldesai avatar migushthe2nd avatar walkercz avatar wrt54g 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.