# Nouveau widget phase de la lune

**URL:** <https://community.gladysassistant.com/t/nouveau-widget-phase-de-la-lune/10697>\
**Category:** Développement\
**Tags:** dashboard\
**Created:** [Août 23, 2026, 10:03 UTC](https://community.gladysassistant.com/t/nouveau-widget-phase-de-la-lune/10697 "2026-08-23T22:03:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Août 23, 2026, 10:03 UTC](https://community.gladysassistant.com/t/nouveau-widget-phase-de-la-lune/10697/1 "2026-08-23T22:03:50Z")

</div>

Pour aller avec les widgets météo et soleil, je propose un nouveau widget avec les phases de la lune.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/2/c29ab55939bce63e7dada205da45b92517790f1a.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/c/3cff7742adc1042d33f6ae747e0c94216c866d80.png)

La PR

> <https://github.com/GladysAssistant/Gladys/pull/2990>
>
> \### Description
> 
> Adds a Moon dashboard widget, next to the existing Sun one.
> …
> It shows the moon as a real photo with the shadow of the current phase drawn over it, along with the phase name and illumination. An optional detail panel lists the distance, the age of the moon, whether it is waxing or waning, its trajectory, the constellation it stands in, moonrise and moonset, and the countdowns to the next full moon, new moon, perigee, apogee, node and lunar eclipse.
> 
> Everything is computed locally from suncalc, which was already a dependency: no external API, no API key, no network call at runtime.
> 
> Two options in the widget settings:
> 
> \- Display details (on by default) — turn off to keep only the moon, its phase name and its illumination.
> \- Compute the values at midnight (off by default) — computes illumination, distance, age and the upcoming events at local midnight, the way lunar calendars publish them, so the widget can be compared with them line by line. Moonrise and moonset belong to the day and are not affected.
> 
> Server side: new GET /api/v1/house/:house\_selector/moon route, backed by gladys.house.getMoonState(), which uses the house coordinates and the instance timezone.
> 
> Moon image: moon.png is a crop of the lunar disk from NASA's Scientific Visualization Studio (Moon Phase and Libration, 2025), public domain, resized to 256×256 and masked to a circle (21 KB). Credit and processing details are in front/src/components/boxs/moon/CREDITS.md.
> 
> Accuracy: the simplified series used by suncalc gives the right dates but times that can be off by a few hours, which is not visible on a "in 5 days" countdown. The constellation uses the sidereal zodiac (with the Lahiri ayanamsa), like lunar calendars do, not the tropical one. The eclipse search is reliable on the date, less so on the exact type and time.
> 
> \<img width="530" height="488" alt="image" src="https://github.com/user-attachments/assets/b7887911-f410-4ece-8d38-f3cfccfaf20e" /\>
> 
> Checklist
> 
> \- \[x\] Tests pass: cd server && npm run coverage (Codecov requires 100% coverage on changed lines) and Cypress (npm run cypress:run) if the UI changed
> \- \[x\] Linter and prettier pass on both front and server (npm run eslint, npm run prettier)
> \- \[x\] No undocumented breaking change

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [Août 27, 2026, 11:50 UTC](https://community.gladysassistant.com/t/nouveau-widget-phase-de-la-lune/10697/2 "2026-08-27T11:50:14Z")

</div>

3 messages ont été scindés en un nouveau sujet : [Nouveau widget - Marées](https://community.gladysassistant.com/t/nouveau-widget-marees/10714)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Octobre 11, 2026, 12:57 UTC](https://community.gladysassistant.com/t/nouveau-widget-phase-de-la-lune/10697/3 "2026-10-11T12:57:32Z")

</div>

> [@\[Intégration externe\] Phase de la lune crescent\_moon](https://community.gladysassistant.com/t/int%C3%A9gration-externe-phase-de-la-lune/11042):
>
> Bonjour à tous, Vous vous souvenez peut-être de ma PR qui ajoutait un widget « Phase de la lune » au core de Gladys (#2990). Pour ne pas alourdir le core, je l’ai transformée en intégration externe : même calcul, mêmes résultats, mais installable seulement par ceux qui le veulent. @pierre-gilles, du coup on pourra fermer la PR Ce que montre le widget La phase du jour (Nouvelle Lune, Premier Croissant, Pleine Lune…), le pourcentage éclairé et l’âge de la lune Le disque lunaire (photo NASA) av…
