Skip to content

trollix/ha-tsmoon-card

Repository files navigation

HA-TSMOON

Startup setup for new lovelace (Home Assistant) card development

What is here?

  • Card code written in TypeScript
  • Bundling all the files to single output
  • CSS code minimized, converted to TS and included in output bundle

Goals

  • Display a simple card to display moon phase

Installation

For installation you should have HACS installed. Then add this repository https://github.com/trollix/ha-tsmoon-card in HACS and install the card. You have to reload you browser after installation.

Then you can add the new card into your dashboard.

Easiest method

✨ Install via HACS

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Alternative method

  1. Download tsmoon-card.js from the Releases page
  2. Upload to /www/ha-tsmoon-card/tsmoon-card.js (via Samba, File Editor, SSH, etc.)
  3. Visit the Resources page in your Home Assistant install and add /ha-tsmoon-card/tsmoon-card.js as a JavaScript Module. Open your Home Assistant instance and show your dashboard resources.
  4. Refresh your browser

Configuration

Name Type Default Description
type string Required custom:custom:tsmoon-card
entity string Required The entity id of moon sensor -> sensor.moon
title string optional Title displayed on the card
icon_type string optional Type of picture for the moon (forms/round/photos)
language string optional The language used in the card

Example:

type: custom:tsmoon-card
title: Lune
entity: sensor.moon
icon_type: round
time_format: 24h
language: fr

Preview

Card (en)

form-en

HA-TSMOON-CARD

round-en

HA-TSMOON-CARD

photo-en

HA-TSMOON-CARD

Card (fr)

form-fr

HA-TSMOON-CARD

round-fr

HA-TSMOON-CARD

photo-fr

HA-TSMOON-CARD

Credits

Code

Localization