Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Image, Video & Audio

Image, Video & Audio

Show NASA APOD and nearest asteroid data in Home Assistant dashboards

On a schedule, it creates or processes media using Home Assistant.

What it does

## Push NASA picture of the day and nearest asteroid data to Home Assistant ### Who's it for Home Assistant users who want a daily dose of space on their dashboard: NASA's Astronomy Picture of the Day plus the closest asteroid passing Earth this week. ### How it works When 6AM Daily (or Manual Test Trigger) starts two parallel branches: - APOD: fetches the Astronomy Picture of the Day from NASA's science.nasa.gov feed (no API key), keeps the title, image (or video thumbnail), date and an explanation trimmed to 280 characters, and upserts sensor.nasa_apod. - Asteroid: fetches NASA's 3-day Near-Earth Object feed, sorts every approach by miss distance, and upserts sensor.nasa_asteroid with name, date, distance, size, speed and hazard flag. ### Setup steps 1. Get a free API key at https://api.nasa.gov. 2. Create a Query Auth credential: name api_key, value = your key. Select it in Fetch Asteroid Feed. (The APOD feed needs no key; NASA retired the old api.nasa.gov APOD endpoint in October 2026.) 3. Create a Home Assistant credential (base URL + long-lived access token) and select it in both Send ... to Home Assistant nodes. 4. Run Manual Test Trigger, then check Developer Tools > States in Home Assistant. 5. Activate the workflow. ### Requirements Home Assistant with API access, a free NASA API key. ### Customization Change the schedule, the explanation length in Set APOD Fields, the look-ahead window in Fetch Asteroid Feed, or the entity IDs. Show the picture with a Picture Entity card using image_url. Note: sensors created through the Home Assistant API disappear after a Home Assistant restart until the next run.

The steps

  1. When 6AM Daily
  2. Fetch NASA APOD Data
  3. Set APOD Fields
  4. Send APOD to Home Assistant
  5. Fetch Asteroid Feed
  6. Set Asteroid Data
  7. Find Nearest Asteroid
  8. Send Asteroid to Home Assistant
  9. Manual Test Trigger

Similar automations