Git Product home page Git Product logo

ha-clockwork-card-no-other-time's Introduction

Clockwork Card

hacs_badge

Current Version: 0.1.2

This is a simple little custom lovelace element that shows a clock and some extra timezones for Home Assistant.

It may break, it may work. For now, it works.

Anyone who wants to fork it and make it better, by all means PLEASE go for it. Will also accept pull requests.

I pretty much stole the idea from Mikael T and then hacked it up to do what I wanted.

If by some miracle it works it should look like this:Sample Image

DISCLAIMER

This was never intended for external use, but was asked a couple times to release it so I did. Use at own risk, absolutely minimal testing has been completed. Milage may very.

INSTALL WITH HACS

To install via HACS select the "Custom repositories" button add in the link in this format user + repository name (You can find this information at the top of the repository. For category select Lovelace then click "ADD".

After this navigate to "Frontend" click the plus symbol and enter "Home Assistant Clockwork Card" into the search bar. Then click on the first result. Description and select "Install this repository in HACS" and you are done!

MANUAL INSTALLATION

To install add it to your custom lovelace folder and then reference it accordingly

resource:
  - url: /local/custom-lovelace/clockwork-card.js
    type: js

CONFIGURATION

Then in your lovelace configuration edit accordingly. It requires you have an existing date_time_iso sensor. (Actually it doesnt read note below)

The Rest should be pretty self explanatory.

  - type: 'custom:clockwork-card'
    #title: "My Time"
    locale: en-AU
    entity: sensor.date_time_iso
    other_time:
      - "America/New_York"
      - "Australia/Sydney"
      - "America/Los_Angeles"

iPhone/Safari

So safari (i.e. mac and ios) has a quirky feature where it imports date/time as UTC time even when not specifically expressed. So on your iPhone or on a Mac, everything will be out by exactly your timezone.

So in this case, dont use an entity. However the time shown will be LOCAL for your device. In other words, if your phone is in a different timezone, it will show that time, and not the time wherever your HomeAssistant instance is.

Will try to fix this.

TODO LIST

[ ] Fix iPhone issue.
[✔️] Integrate with HACS.
[ ] Clean up README and more detailed install 
[ ] Have ability to choose whether to show local device time or HomeAssistant time.

ha-clockwork-card-no-other-time's People

Contributors

barleybobs avatar robmarkoski avatar

Stargazers

 avatar

Watchers

 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.