https://github.com/trollix/ha-tsmoon-card
Home Assistant lovelace custom card Simple Moon phases
https://github.com/trollix/ha-tsmoon-card
card custom-card home-assistant lovelace moon
Last synced: 4 months ago
JSON representation
Home Assistant lovelace custom card Simple Moon phases
- Host: GitHub
- URL: https://github.com/trollix/ha-tsmoon-card
- Owner: trollix
- License: mit
- Created: 2023-11-17T13:55:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-18T08:34:32.000Z (6 months ago)
- Last Synced: 2025-12-21T15:50:39.816Z (6 months ago)
- Topics: card, custom-card, home-assistant, lovelace, moon
- Language: TypeScript
- Homepage:
- Size: 1.52 MB
- Stars: 16
- Watchers: 2
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
* [X] Display a simple card to display moon phase
## Installation
For installation you should have [HACS](https://hacs.xyz/docs/setup/download/) installed. Then add this repository 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
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=trollix&repository=ha-tsmoon-card)
### Alternative method
1. Download `tsmoon-card.js` from the [Releases](https://github.com/trollix/ha-tsmoon-card/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.
[](https://my.home-assistant.io/redirect/lovelace_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 |
| time_format | string | **optional** | Time Format: 12h / 24h |
| hemisphere | string | **optional** | Hemisphere (North:N - South:S) |
Example:
```yaml
type: custom:tsmoon-card
title: Lune
entity: sensor.moon
icon_type: round
time_format: 24h
language: fr
hemisphere: N
```
## Preview
### Card (en)
#### form-en

#### round-en

#### photo-en

### Card (fr)
#### form-fr

#### round-fr

#### photo-fr

## Credits
### Code
* Time Format option : [tmcarr](https://github.com/tmcarr "tmcarr")
### Localization
* de: [MickLesk](https://github.com/MickLesk "MickLesk")
* es: [ldsmovil](https://github.com/ldsmovil "ldsmovil")
* sk: [misa1515](https://github.com/misa1515 "misa1515")
* ca: [rogodra](https://github.com/rogodra "rogodra")
* ru: [Nikolay-Ch](https://github.com/Nikolay-Ch "Nikolay-Ch")
* cz: [havlejan](https://github.com/havlejan "havlejan")
* pl: [arnione](https://github.com/arnione "arnione")
* pt: [ViPeR5000](https://github.com/ViPeR5000 "ViPeR5000")
* pt-BR : [netsoft-ruidias](https://github.com/netsoft-ruidias "netsoft-ruidias")
* ro: [boogytotyo](https://github.com/boogytotyo "boogytotyo")
* it: [sky7176](https://github.com/sky7176 "sky7176")