I’ve always been fascinated by the moon and its phases, so I decided to bring that realism into my Home Assistant setup! ![]()
I wanted something more dynamic than the generic moon phase icons, so I came up with a solution using live data from Timeanddate Moonphase. Here’s how I did it:
- Extracting Moon Data: I used Firefox’s command line to extract moon phase images from the website. This gives me accurate, real-time moon phases based on my location.
- Automating with Bash: I created a bash script that runs via cron job to update the moon phase images daily. This ensures the moon phase is always up-to-date!
- Custom Dashboard Integration: I cropped the images to fit my Lovelace dashboard perfectly. The result? A seamless, realistic moon phase display that changes daily!


If you’re interested in replicating this, I’ve shared the script and sample outputs on Google Drive. Feel free to modify it to suit your location! ![]()
![]()
It’s been a fun project, and I love how it adds a touch of nature to my smart home setup. If you give it a try, let me know how it goes! ![]()
![]()