GithubHelp home page GithubHelp logo

aitordb / home-assistant-sun-card Goto Github PK

View Code? Open in Web Editor NEW
405.0 13.0 183.0 308 KB

Home assistant sun card based on Google weather design

License: MIT License

HTML 6.16% JavaScript 3.75% TypeScript 90.10%
home-assistant hacs sun-card sun custom-card

home-assistant-sun-card's Introduction

Home assistant Sun card

Home assistant Sun card based on Google weather design

Preview

Light mode preview Dark mode preview

Requirements

Install

HACS

Home assistant Sun card is available by default on HACS directory. More info here.

Manually

  1. Download the home-assistant-sun-card.js file from the latest release available and save it in your configuration/www folder.
  2. Go to Configuration > Lovelace dashboard > Resources in Home Assistant and click on Add resource.
    1. Add /local/community/home-assistant-sun-card.js to the URL.
    2. Choose Javascript Module as Resource type.

Set up

Using UI

  1. Go to your dashboard, enter in edit mode and click on Add card, you should be able to find Custom: Sun card in the list.
  2. Once in the UI editor you can modify the card behavior by adding some of the config that you will find below

Note: If Custom: Sun card doesn't appear you will have to reload cleaning the cache.

Using YAML

  1. You just need to add a new card with type: 'custom:sun-card' to your cards list and any of the config that you will find below if you want to customize more your card.

Note: If you get an error similar to this Custom element doesn't exist you will have to reload cleaning the cache.

Config

Name Accepted values Description Default
darkMode boolean Changes card colors to dark or light Home assistant dark mode state
language string1 Changes card language Home assistant language or english if not supported
showAzimuth boolean Displays azimuth in the footer false
showElevation boolean Displays elevation in the footer false
timeFormat '12h'/'24h' Displayed time format Locale based on Home assistant language
title string Card title Doesn't display a title by default

(1) Supported languages: da, de, en, es, et, fi, fr, hu, it, nl, pl, pt-BR, ru, sl, sv

Known issues

  • Home assistant seems to provide next events instead today's one

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.