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.
The integration's sensors driving a "Today's Sky" panel on a smart-mirror dashboard.
Two kinds of entry you can add: Current sky (transits) and a Birth chart
per Home Assistant person.
| Sensor | State | Attributes |
|---|---|---|
sensor.astrology_sun … sensor.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.
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.
- HACS → ⋮ → Custom repositories → add
https://github.com/deepschiff/ha-astrology, category Integration (or use the button above). - Install Astrology, then restart Home Assistant.
- Settings → Devices & Services → Add Integration → Astrology → choose Current sky and/or add a Birth chart per person.
Copy custom_components/astrology into your Home Assistant config/custom_components/, restart, then add the integration.
- 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.
# 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.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.
MIT