{"id":14985211,"url":"https://github.com/ngocjohn/lunar-phase-card","last_synced_at":"2026-01-17T10:55:37.056Z","repository":{"id":249525820,"uuid":"831739499","full_name":"ngocjohn/lunar-phase-card","owner":"ngocjohn","description":"🌘 Custom card for tracking Moon phases","archived":false,"fork":false,"pushed_at":"2025-01-03T01:47:18.000Z","size":98056,"stargazers_count":101,"open_issues_count":0,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T07:02:30.273Z","etag":null,"topics":["custom-card","homeassistant","lovelace","lunar","lunar-phases","moon","moon-phase"],"latest_commit_sha":null,"homepage":"https://ngocjohn.is-a.dev/lunar-phase-card/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngocjohn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ngocjohn","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"ngocjohn","custom":null}},"created_at":"2024-07-21T13:43:21.000Z","updated_at":"2025-03-28T17:54:52.000Z","dependencies_parsed_at":"2024-08-28T17:05:10.427Z","dependency_job_id":"5bbf4257-d22c-42da-82b5-6716d19729cf","html_url":"https://github.com/ngocjohn/lunar-phase-card","commit_stats":{"total_commits":229,"total_committers":12,"mean_commits":"19.083333333333332","dds":"0.20087336244541487","last_synced_commit":"977b90e309b39244024dacd3177e52722a4ef65d"},"previous_names":["ngocjohn/lunar-phase-card"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngocjohn%2Flunar-phase-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngocjohn%2Flunar-phase-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngocjohn%2Flunar-phase-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngocjohn%2Flunar-phase-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngocjohn","download_url":"https://codeload.github.com/ngocjohn/lunar-phase-card/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305933,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-card","homeassistant","lovelace","lunar","lunar-phases","moon","moon-phase"],"created_at":"2024-09-24T14:10:31.035Z","updated_at":"2026-01-17T10:55:37.047Z","avatar_url":"https://github.com/ngocjohn.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ngocjohn","https://buymeacoffee.com/ngocjohn","https://www.buymeacoffee.com/ngocjohn"],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n[![hacs][hacs-default]][hacs-default-link] [![hacs][hacs-validate]][hacs-validate-link] ![total-downloads] ![latest-downloads] [![community-forum][forum-badge]][forum-url] [![buy_me_a_coffee][bmac-badge]][bmac-link]\n\n# 🌘 Lunar Phase Card\n\n\u003ca href=\"#\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/header.gif\" style=\"border-radius: 8px\" /\u003e\u003c/a\u003e\n\n##\n\n\u003cp style=\"text-align: justify;\"\u003eThis is a Lovelace custom card for Home Assistant that provides detailed information about the current phase of the moon. This card leverages precise astronomical calculations to deliver accurate lunar data, making it a valuable addition for those interested in astronomy, astrology, or just tracking the moon's phases.\u003c/p\u003e\n\n\n## Table of contents\n\n\u003cdetails\u003e\n    \u003csummary\u003eTable of contents\u003c/summary\u003e\n\n- [Overview](#Lunar-Phase-Card)\n- [Features](#features)\n- [Installation](#installation)\n  - [HACS Installation](#hacs-installation)\n  - [Manual Installation](#manual-installation)\n- [Configuration](#configuration)\n\n\u003c/details\u003e\n\n## Features\n\n- **Current Lunar Phase Display:** Shows the current phase of the moon.\n- **Detailed Lunar Information:** Provides additional details about the lunar cycle.\n- **Customizable:** Easily customizable to fit your dashboard's theme.\n- **Responsive Design:** Works well on both desktop and mobile devices.\n- **Custom Latitude and Longitude Configuration:** Offers the possibility to configure custom latitude and longitude for precise lunar data.\n- **Specific Date Lunar Information:** Option to display the moon information for a specific date.\n- **Multilingual Support**: The card includes various translations, making it accessible in multiple languages.\n\n\u003c!--LOCALIZATION-CONTENT-START--\u003e\n\n### Supported Localization\n\n\u003cdetails\u003e\n  \u003csummary\u003eThe following languages are supported in this project\u003c/summary\u003e\n\n| Lange Code   | Name                     | Native Name              |\n|--------------|--------------------------|--------------------------|\n| `ca`         | Catalan                  | Català                   |\n| `cs`         | Czech                    | Čeština                  |\n| `da`         | Danish                   | Dansk                    |\n| `de`         | German                   | Deutsch                  |\n| `en`         | English                  | English                  |\n| `es`         | Spanish                  | Español                  |\n| `fr`         | French                   | Français                 |\n| `id`         | Indonesian               | Bahasa Indonesia         |\n| `it`         | Italian                  | Italiano                 |\n| `ko`         | Korean                   | 한국어                     |\n| `lt`         | Lithuanian               | Lietuvių                 |\n| `nl`         | Nederlands               | Dutch                    |\n| `pl`         | Polish                   | Polski                   |\n| `pt`         | Portuguese               | Português (Brasil)       |\n| `ru`         | Русский                  | Русский                  |\n| `sk`         | Slovak                   | Slovenčina               |\n| `sv`         | Swedish                  | Svenska                  |\n| `tr`         | Turkish                  | Türkçe                   |\n| `ua`         | Ukrainian                | Українська               |\n| `vi`         | Vietnamese               | Tiếng Việt               |\n| `zh-Hans`    | Chinese                  | 中文                      |\n\n\u003c/details\u003e\n\u003c!--LOCALIZATION-CONTENT-END--\u003e\n\n### View options\n* Default view\n\n![Default card][header-default-card]\n![Default no header][no-header-default-card]\n\n* Calendar card\n\n![Calendar card][header-calendar-card]\n![Calendar no header][no-header-calendar]\n\n* Horizon graph\n\n![Dynamic card no header][no-header-dynamic-graph]\n![Horizon card][header-horizon-graph]\n![Horizon card no header][no-header-horizon-graph]\n\n* Compact view\n\n![Compact card][header-compact-card]\n![Compact card no header][no-header-compact-card]\n\n* Compact mode minimal\n\n![Compact minimal][compact-mode-minimal]\n\n\n## Installation\n\n### [HACS](https://hacs.xyz) (Home Assistant Community Store)\n\nUse this link to directly go to the repository in HACS\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=ngocjohn\u0026repository=lunar-phase-card\u0026category=plugin)\n\nor\n\n1. If HACS is not installed yet, download it following the instructions on [https://hacs.xyz/docs/use/#getting-started-with-hacs](https://hacs.xyz/docs/use/#getting-started-with-hacs)\n2. Open HACS in Home Assistant\n3. Search for `Lunar Phase Card`\n4. Click the download button. ⬇️\n5. Force refresh the Home Assistant page `Ctrl` + `F5` / `Shift` + `⌘` + `R`\n6. Add `lunar-phase-card` to your dashboard\n\n\n### Manual\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand installation instructions\u003c/summary\u003e\n\n1. Download the [lunar-phase-card.js](https://github.com/ngocjohn/lunar-phase-card/releases/latest).\n2. Place the downloaded file on your Home Assistant machine in the `config/www` folder (when there is no `www` folder in the folder where your `configuration.yaml` file is, create it and place the file there).\n3. In Home Assistant go to `Configuration-\u003eLovelace Dashboards-\u003eResources` (When there is no `resources` tag on the `Lovelace Dashboard` page, enable advanced mode in your account settings, and retry this step).\n4. Add a new resource:\n   - Url = `/local/lunar-phase-card.js`\n   - Resource type = `module`\n5. Force refresh the Home Assistant page `Ctrl` + `F5` / `Shift` + `⌘` + `R`.\n6. Add lunar-phase-card to your page.\n\n\u003c/details\u003e\n\n## Configuration\n\n\u003cp style=\"text-align: justify;\"\u003eAll options can be configured in the GUI editor. To configure the Lunar Phase Card, you can use the following parameters in your Lovelace configuration:\u003c/p\u003e\n\n## Card Configuration\n\n![Card config editor][card-config-editor]\n\n---\n\n## 🌍 Location Configuration\n\n| Name | Type | Requirement | Description |\n| ---- | ---- | ----------- | ----------- |\n| `type` | string | Required | Card type: `custom:lunar-phase-card` |\n| `location_source` | string | Optional | Source of location data. Options: `default`, `entity`, `custom`. Defaults to `default`. |\n| `entity` | string | Optional | Entity used as a location source when `location_source: entity`. Latitude and longitude are read from entity attributes. |\n| `latitude` | number | Optional | Custom latitude (used when `location_source: custom`). |\n| `longitude` | number | Optional | Custom longitude (used when `location_source: custom`). |\n| `southern_hemisphere` | boolean | Optional | Adjusts moon orientation for southern hemisphere users. Defaults to `false`. |\n\n---\n\n## 🎨 Appearance \u0026 Behavior\n\n| Name | Type | Requirement | Description |\n| ---- | ---- | ----------- | ----------- |\n| `language` | string | Optional | Language ISO code. Defaults to `en`. |\n| `default_section` | string | Optional | Section shown on load. Options: `base`, `calendar`, `horizon`, `full_calendar`. |\n| `compact_view` | boolean | Optional | Enable compact card layout. Defaults to `false`. |\n| `compact_mode` | string | Optional | Compact mode style. Options: `default`, `minimal`. |\n| `moon_position` | string | Optional | Position of the moon image on the base section. Options: `left`, `right`. |\n| `hide_background` | boolean | Optional | Hide the card background image. Defaults to `false`. |\n| `custom_background` | string | Optional | Custom background image URL. |\n| `hide_starfield` | boolean | Optional | Hide the starfield background layer. |\n| `hide_buttons` | boolean | Optional | Hide the menu buttons used to switch sections. |\n| `compact_menu_button` | boolean | Optional | Use a compact style for the menu button. |\n| `hide_compact_label` | boolean | Optional | Hide labels when compact view is enabled. |\n| `calendar_modal` | boolean | Optional | Open the calendar section in a modal popup. |\n| `custom_theme` | string | Optional | Custom Home Assistant theme name applied to the card. |\n| `theme_mode` | string | Optional | Theme mode. Options: `auto`, `light`, `dark`. Defaults to `auto`. |\n\n---\n\n## 📊 Layout \u0026 Data Visualization\n\n| Name | Type | Requirement | Description |\n| ---- | ---- | ----------- | ----------- |\n| `hide_items` | list | Optional | List of data items to hide in data views. |\n| `max_data_per_page` | number | Optional | Maximum number of data items per page in the data-info view. |\n| `number_decimals` | number | Optional | Number of decimals shown for numeric values. |\n| `mile_unit` | boolean | Optional | Use miles instead of kilometers for distance values. |\n| `12hr_format` | boolean | Optional | Use 12-hour time format instead of 24-hour. |\n| `font_config` | object | Optional | Font customization options for the card. |\n| `graph_chart_config` | object | Optional | Chart configuration for the horizon section. |\n\n\n\u003e [!NOTE]\n\u003e The `entity` parameter is not required. It refers to the entity ID from the Lunar Card Custom component, which can be installed [here](https://github.com/ngocjohn/lunar-phase). If the `entity` is not defined, the card will use the default latitude and longitude from the system configuration.\n\n### Font Customization Options\n| Name                  | Type    | Description                                                               |\n| --------------------- | ------- | ------------------------------------------------------------------------- |\n| `header_font_size`    | string  | Font size for the header. Options: `auto`, `small`, `medium`, `large`, `x-large`, `xx-large`. Defaults to `x-large`. |\n| `header_font_style`   | string  | Text style for the header. Options: `none`, `capitalize`, `uppercase`, `lowercase`. Defaults to `capitalize`. |\n| `header_font_color`   | string  | Color for the header text.                                                |\n| `label_font_size`     | string  | Font size for labels. Options: `auto`, `small`, `medium`, `large`, `x-large`, `xx-large`. Defaults to `auto`. |\n| `label_font_style`    | string  | Text style for labels. Options: `none`, `capitalize`, `uppercase`, `lowercase`. Defaults to `none`. |\n| `label_font_color`    | string  | Color for label text.                                                     |\n| `hide_label`          | boolean | Whether to hide labels on the card. Defaults to `false`.                  |\n\n### Chart Configuration Options\n| Name                  | Type    | Description                                                               |\n| --------------------- | ------- | ------------------------------------------------------------------------- |\n| `graph_type`          | string  | Type of the graph. Options: `default`, `dynamic`. Defaults to `default`.  |\n| `y_ticks`             | boolean | Whether to show y-axis ticks. Defaults to `false`.                        |\n| `x_ticks`             | boolean | Whether to show x-axis ticks. Defaults to `false`.                        |\n| `show_time`           | boolean | Whether to show time labels on the chart. Defaults to `true`.             |\n| `show_current`        | boolean | Whether to show the current moon position. Defaults to `true`.            |\n| `show_highest`        | boolean | Whether to show the highest moon point. Defaults to `true`.               |\n| `y_ticks_position`    | string  | Position of the y-axis ticks. Options: `left`, `right`. Defaults to `left`.|\n| `y_ticks_step_size`   | number  | Step size for y-axis ticks. Defaults to `30`.                             |\n| `time_step_size`      | number  | Step size for time labels. Defaults to `30`.                              |\n\n\n### Example Configuration\n\nHere's an example configuration for the Lunar Phase Card:\n\n```yaml\ntype: custom:lunar-phase-card\nlocation_source: default\nentity: sensor.lunar_phase\nsouthern_hemisphere: false\nlatitude: 50.06038385213462\nlongitude: 14.399275481700899\nlanguage: en\nhide_background: true\nhide_starfield: true\ncustom_background: http://localhost:8235/background/moon_bg_2.png\ntheme_mode: dark\ndefault_section: base\ncompact_view: false\nmoon_position: right\nhide_buttons: false\ncompact_menu_button: false\nhide_compact_label: false\ncalendar_modal: false\nhide_items: []\nnumber_decimals: 2\nmile_unit: false\n12hr_format: true\nfont_config:\n  label_font_size: auto\n  label_font_style: none\n  label_font_color: \"\"\ngraph_chart_config:\n  graph_type: dynamic\n  y_ticks: false\n  x_ticks: false\n  show_time: false\n  show_current: true\n  show_highest: true\n  y_ticks_position: left\n  y_ticks_step_size: 30\n  time_step_size: 30\n  show_legend: true\n  legend_position: top\n  legend_align: center\n\n\n```\n\n## Contribution Guidelines\n\nWe welcome contributions and are grateful for your support in improving this project. If you'd like to contribute, please follow our [Contribution Guidelines](docs/CONTRIBUTING.md) to get started.\n\n## Support\nIf you like the card, consider supporting the developer\n\n\u003ca href=\"https://www.buymeacoffee.com/ngocjohn\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 150px !important;\" \u003e\u003c/a\u003e\n\n---\n\n\u0026copy; 2024 Viet Ngoc\n\n[https://github.com/ngocjohn/](https://github.com/ngocjohn/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!--IMAGES--\u003e\n[header-default-card]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-default-view.gif\n[no-header-default-card]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/no_header_default.gif\n[header-calendar-card]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-header-calendar.gif\n[no-header-calendar]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/no_header_calendar.gif\n[header-horizon-graph]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-header-horizon-graph.gif\n[no-header-horizon-graph]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/no_header_horizon_graph.gif\n[no-header-dynamic-graph]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/no_header_dynamic_graph.gif\n[header-compact-card]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-compact-view.png\n[no-header-compact-card]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/no_header_compact.png\n[card-config-editor]:https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-config-editor.gif\n[compact-mode-minimal]: https://raw.githubusercontent.com/ngocjohn/lunar-phase-card/main/assets/lunar-compact-minimal.gif\n\n\u003c!--BADGES--\u003e\n[hacs-default]: https://img.shields.io/badge/HACS-Default-blue?style=flat\u0026logo=homeassistantcommunitystore\u0026logoSize=auto\n[hacs-default-link]: https://my.home-assistant.io/redirect/hacs_repository/?owner=ngocjohn\u0026repository=lunar-phase-card\u0026category=plugin\n[hacs-validate]: https://github.com/ngocjohn/lunar-phase-card/actions/workflows/validate.yaml/badge.svg\n[hacs-validate-link]: https://github.com/ngocjohn/lunar-phase-card/actions/workflows/validate.yaml\n[total-downloads]: https://img.shields.io/github/downloads/ngocjohn/lunar-phase-card/total?style=flat\u0026logo=homeassistantcommunitystore\u0026logoSize=auto\u0026label=Downloads\u0026color=%2318BCF2\n[latest-downloads]:https://img.shields.io/github/downloads/ngocjohn/lunar-phase-card/latest/total?style=flat\u0026logo=homeassistantcommunitystore\u0026logoSize=auto\n[bmac-link]: https://www.buymeacoffee.com/ngocjohn\n[bmac-badge]: https://img.shields.io/badge/_-buy_me_a_coffee-F28834?style=flat\u0026logo=buymeacoffee\u0026labelColor=grey\u0026color=%23F28834\n[forum-url]: https://community.home-assistant.io/t/lunar-phase-integration-for-home-assistant\n[forum-badge]: https://img.shields.io/badge/forum-community?style=flat\u0026logo=homeassistant\u0026label=community\u0026color=blue","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngocjohn%2Flunar-phase-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngocjohn%2Flunar-phase-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngocjohn%2Flunar-phase-card/lists"}