Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astrology for Home Assistant

HACS Custom Validate GitHub Release License: MIT Home Assistant

A Home Assistant custom integration that computes the current planetary positions, zodiac signs, retrogrades, and moon phase entirely locally using PyEphem. No cloud service, no API key, no account — just real geocentric ephemeris math.

Useful for astrology dashboards, "what's the sky doing today" automations, or feeding genuinely sky-grounded context into an LLM (e.g. a personalized horoscope) instead of letting it improvise.

Today's Sky panel on a Home Assistant dashboard: waning crescent moon in Gemini, Mercury retrograde, Cancer season with Virgo rising
The integration's sensors driving a "Today's Sky" panel on a smart-mirror dashboard.

What you get

Two kinds of entry you can add: Current sky (transits) and a Birth chart per Home Assistant person.

Current sky (transits) — one Astrology device

Sensor State Attributes
sensor.astrology_sunsensor.astrology_pluto current sign (e.g. Gemini) degrees (0–30 into sign), retrograde, glyph
sensor.astrology_moon current sign also phase, illumination
sensor.astrology_moon_phase phase name (e.g. Waxing Crescent) illumination (%)
sensor.astrology_ascendant sign rising now (uses HA's location) degrees, glyph
sensor.astrology_retrograde_planets count of retrograde planets planets (list)
sensor.astrology_aspects count of active aspects aspects, text (e.g. Venus Trine Mars)
sensor.astrology_next_full_moon / _next_new_moon timestamp
sensor.astrology_summary one-line sky summary bodies, ascendant, retrograde, aspects

Bodies covered: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto. Planet-in-sign positions are tropical geocentric ecliptic longitudes (what western astrology uses), independent of your location; the Ascendant uses your time + location.

Birth chart — one device per person

Add a Birth chart entry, pick an HA person, and enter their birth date, exact time, time zone, and location. You get a <name> natal chart device:

Sensor State Attributes
sensor.<name>_natal_chart Sun Aquarius, Moon Pisces, Rising Libra person, sun, moon, rising, placements (LLM-ready string), bodies, ascendant, aspects
sensor.<name>_natal_chart_sun_pluto natal sign degrees, retrograde, glyph
sensor.<name>_natal_chart_rising rising sign degrees, glyph

The placements attribute is a ready-to-paste natal summary for prompting an LLM (e.g. a personalized horoscope grounded in the live sky + the person's chart). Accurate Rising signs need an exact birth time and place.

Installation

HACS (recommended)

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

  1. HACS → ⋮ → Custom repositories → add https://github.com/deepschiff/ha-astrology, category Integration (or use the button above).
  2. Install Astrology, then restart Home Assistant.
  3. Settings → Devices & Services → Add Integration → Astrology → choose Current sky and/or add a Birth chart per person.

Manual

Copy custom_components/astrology into your Home Assistant config/custom_components/, restart, then add the integration.

Options

  • Recompute interval (minutes) — how often positions are recalculated (default 30). Signs move slowly; the math is cheap, so this is mostly about how quickly retrograde stations / sign ingresses are reflected.

Example: a sky-grounded LLM horoscope

# In an ai_task / conversation prompt template:
Today's real sky is: {{ states('sensor.astrology_summary') }}.
The moon is {{ states('sensor.astrology_moon_phase') }}
({{ state_attr('sensor.astrology_moon_phase','illumination') }}% lit).
Ground the reading in these actual current positions.

How it works

Positions come from PyEphem's geocentric ecliptic longitude for each body; the sign is floor(longitude / 30°). Retrograde is detected by comparing a body's longitude now versus +1 day (decreasing ⇒ retrograde). Moon phase uses illumination percentage plus a +1h sample to determine waxing vs. waning. All computation runs in the executor on a DataUpdateCoordinator.

License

MIT

About

A Home Assistant custom integration that computes the current planetary positions, zodiac signs, retrogrades, and moon phase

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages