Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Home assistant sun card based on Google weather design

License

Notifications You must be signed in to change notification settings

selfish/lovelace-sun-card

 
 

Repository files navigation

Lovelace Sun Card

DEPRECATED

USE https://github.com/rejuvenate/lovelace-horizon-card



Home assistant Sun card based on Google weather design.

Resurrected from AitorDB/home-assistant-sun-card, based on original work by AitorDB.

Preview

Installation

Requirements:

Install Via HACS (recommended):

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

Manual Install:
  1. Download the lovelace-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/lovelace-sun-card.js to the URL.
    2. Choose Javascript Module as Resource type.

Setup

Via 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

About

Home assistant sun card based on Google weather design

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 93.8%
  • JavaScript 4.4%
  • HTML 1.8%