The Moon integration tracks the phases of the moon.
Adding Moon to your Home Assistant instance can be done via the user interface, by using this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
Browse to your Home Assistant instance.
In the sidebar, select Settings.
From the configuration menu, select Devices & Services.
In the bottom right, select the Add Integration button.
From the list, search and select Moon.
Follow the instructions on screen to complete the setup.
The sensor provided by this integration will return one of the following values: