Skip to content

Tamsy/lunar-phase

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HASSFEST GitHub Downloads (all assets, all releases) GitHub Downloads (all assets, latest release)

🌘 Lunar Phase Integration for Home Assistant

The Lunar Phase integration is a custom component for Home Assistant that provides detailed information about the current phase of the moon. This integration 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.

Features

  • Moon Phase Sensor: Displays the current phase of the moon (e.g., New Moon, Waxing Crescent, First Quarter, etc.).
  • Moon Age: Shows the age of the moon in days.
  • Distance to Moon: Provides the distance to the moon in kilometers.
  • Illumination Fraction: Indicates the fraction of the moon that is illuminated.
  • Moon Rise and Set Times: Displays the moon rise and set times.
  • Next New and Full Moon: Provides the dates for the next new moon and full moon.
Lunar Phase Sensor Attributes Lunar Phase Entities

Enhance Your Dashboard with a Beautiful Lunar Display

Tip

If you're looking to add a visually appealing and informative lunar phase tracker to your Home Assistant dashboard, check out my custom Lunar Phase Card. This card provides detailed monthly phase information and integrates seamlessly with your existing setup. It's a great addition for anyone interested in astronomy or simply wanting to keep track of the moon's phases in a stylish way. You can find and install the Lunar Phase Card here.

Lunar Phase Cards Lunar Phase Calendar

Table of contents

Table of contents

Installation

HACS Installation

  1. Go to the HACS settings and add this repository as a custom repository.
  2. Search for "Lunar Phase" in HACS and install it.
  3. Restart Home Assistant.

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

Manual Installation

  1. Download the lunar_phase folder from this repository.
  2. Copy the lunar_phase folder to your Home Assistant custom_components directory. The custom_components directory resides in the same directory as your configuration.yaml file.
  3. Restart Home Assistant.

Configuration

Using the Home Assistant UI

To configure the Lunar Phase integration, follow these steps:

  1. Go to the Home Assistant dashboard.
  2. Navigate to Configuration > Devices & Services > Add Integration.
  3. Search for Lunar Phase and select it.
  4. You will be prompted to enter the city for your location.
    • City: Enter the name of your city. If the city is not found in the database, you will be prompted to provide additional information:
      • Region: The region or state where the city is located.
      • Timezone: The timezone of the city.
      • Latitude: The latitude coordinate of the city.
      • Longitude: The longitude coordinate of the city.

Once configured, the integration will add the Moon Phase sensor along with other diagnostic sensors that provide detailed lunar information.

Sensor Details

Moon Phase Sensor

  • Name: Moon Phase
  • Attributes:
    • age: The age of the moon in days.
    • distance_km: The distance to the moon in kilometers.
    • illumination_fraction: The fraction of the moon that is illuminated.
    • moon_rise: The moon rise time.
    • moon_set: The moon set time.
    • next_full: The next full moon date.
    • next_new: The next new moon date.

Moon Age Sensor

  • Name: Moon Age
  • Unit: days

Moon Distance Sensors

  • Name: Moon Distance
  • Unit: km

Moon Illumination Fraction Sensor

  • Name: Moon Illumination Fraction
  • Unit: %

Moon Rise and Set Sensors

  • Name: Moon Rise
  • Device Class: timestamp
  • Name: Moon Set
  • Device Class: timestamp

Next Full and New Moon Sensors

  • Name: Next Full Moon
  • Device Class: timestamp
  • Name: Next New Moon
  • Device Class: timestamp

Contribution

Contributions are welcome! If you have any suggestions, issues, or feature requests, please open an issue or submit a pull request.

Enjoy tracking the lunar phases with the Lunar Phase integration for Home Assistant!

Β© 2024 Viet Ngoc

https://github.com/ngocjohn/

(back to top)

About

🌘 Lunar Phase Integration for Home Assistant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.1%
  • HTML 1.9%