Hi all,
I would like to share with you an initial state of my personal project for a NASA package in Home Assistant.
There are several resources through the internet on this, and I am trying to collect them in a unique package.
Let me share with you what I have untill now (very basic, but a beginning).
My nasa.yaml file looks like this:
###
# NASA API collection
#
# Get API Token at: https://api.nasa.gov/index.html
###
# Input text to manage NASA API Token in a resource_template
input_text:
nasa_api_key:
name: NASA API Key
initial: !secret nasa_api_key
mode: password
# API APOD: NASA Astronomical Picture of the Day
sensor:
- platform: rest
resource_template: https://api.nasa.gov/planetary/apod?api_key={{ states("input_text.nasa_api_key") }}
name: nasa_apod
value_template: "OK"
json_attributes:
- date
- title
- explanation
- url
homeassistant:
customize:
sensor.nasa_apod:
friendly_name: Astronomical Picture of the Day
icon: mdi:image
###
# Clear recorder
###
recorder:
exclude:
entities:
- input_text.nasa_api_key
- sensor.nasa_apod
I also added a Lovelace Markdown card to show this first element:
type: markdown
content: |
## {{ states.sensor.nasa_apod.attributes.title }}
_{{ states.sensor.nasa_apod.attributes.date }}_
![Image]({{ states.sensor.nasa_apod.attributes.url }})
{{ states.sensor.nasa_apod.attributes.explanation }}
As an extra, in the same package I have added ISS integration to show in the Map the position of the station:
# International Space Station position
# Home Assistant Integration: https://www.home-assistant.io/integrations/iss/
binary_sensor:
- platform: iss
name: International Space Station
show_on_map: true
I’ve seen that in NASA’s API Collection I can see Mars Rover’s images and Asteroids that will pass near the Earth, among other interesting integrations.
I have these ideas to evolve:
- Notifications: if ISS is visible in my location, any Space event alert…
- Next rocket launches
- SpaceX integration (I’ve seen that there is an API)
Please tell me if you like this and any other suggestions you may have. I am starting with it, please don’t be bad with me
Thanks for reading!