Skip to content

jeremyhamm/home-assistant-moon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Moon 🌙

License: MIT

Custom card for displaying the current phase of the moon in Home Assistant using the moon integration. This card also (optionally) uses the Sun Entity to determine the background color of the card.

When sun is above horizon

Day example

When sun is below horizon

Night example

Installation

Step 1

Enable the moon integration by adding the following to configuration.yaml:

sensor:
- platform: moon

Step 2

Install moon-card by copying moon.js and images from this repo to <config directory>/www/moon-phases on your Home Assistant instance.

Step 3

Link moon-card inside your ui-lovelace.yaml.

resources:
- url: /local/moon-phases/moon.js
  type: module

Config

Name Type Default Reference Description
type string Required custom:moon-phases Card reference
entity string Required sensor.moon Moon entity
entity string Optional sun.sun Include if you would like the card to use light mode while sun is up

Example

type: 'custom:moon-phases'
entities: 
- sensor.moon
- sun.sun