https://github.com/djtimca/harocketlaunchlive
Home Assistant custom HACS integration to integrate the next 5 global rocket launches from https://rocketlaunch.live
https://github.com/djtimca/harocketlaunchlive
home-assistant home-assistant-custom launch nasa rocket spacex ula
Last synced: 3 months ago
JSON representation
Home Assistant custom HACS integration to integrate the next 5 global rocket launches from https://rocketlaunch.live
- Host: GitHub
- URL: https://github.com/djtimca/harocketlaunchlive
- Owner: djtimca
- Created: 2020-10-07T19:54:21.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-09T13:02:25.000Z (5 months ago)
- Last Synced: 2025-05-09T14:22:11.026Z (5 months ago)
- Topics: home-assistant, home-assistant-custom, launch, nasa, rocket, spacex, ula
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 17
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Home Assistant Custom Component for Rocket Launch Live - Next 5 Global Launches
[](https://github.com/hacs/integration)
The status of the next 5 launches will be returned as five individual sensors with additional data shared in the attributes:
## Usage
### Install through HACS:
Add a custom repository in HACS pointed to https://github.com/djtimca/harocketlaunchlive
The new integration for Rocket Launch Live should appear under your integrations tab.
Click Install and restart Home Assistant.
### Install manually:
Copy the contents found in https://github.com/djtimca/harocketlaunchlive/custom_components/rocketlaunchlive to your custom_components folder in Home Assistant.
Restart Home Assistant.
### Activate the sensors:
Go to Configuration -> Integrations and click the + to add a new integration.
Search for Rocket Launch Live and you will see the integration available.
#### Free API Use:
Click add, leave the API key blank, confirm you want to install, and voila... you have the status of the next 5 launches as sensors in your Home Assistant.#### Paid API Use:
Click add, enter your paid API key from https://rocketlaunch.live, confirm your installation, and you are all set.Note: Free API use does not have access to the media links, so the media attribute will always remain blank if you have not paid for access.
Enjoy!
### Display the data using the custom:button-card
You can easily display the data using the custom:button-card lovelace template from HACS:
```
type: vertical-stack
title: Next 5 Rocket Launches
cards:
- type: 'custom:button-card'
entity: sensor.rocket_launch_1
show_name: false
show_state: true
show_icon: false
layout: icon_state
styles:
card:
- font-size: 12px
- padding: 10px
grid:
- grid-template-areas: >-
"s" "provider" "vehicle" "launch_pad" "location" "target_date"
"tags"
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content min-content
state:
- font-weight: bold
- font-size: 16px
- align-self: start
- justify-self: start
custom_fields:
provider:
- align-self: start
- justify-self: start
vehicle:
- align-self: start
- justify-self: start
launch_pad:
- align-self: start
- justify-self: start
location:
- align-self: start
- justify-self: start
target_date:
- align-self: start
- justify-self: start
tags:
- align-self: start
- justify-self: start
custom_fields:
provider: |
[[[
return `Provider: ${states['sensor.rocket_launch_1'].attributes["provider"]}`
]]]
vehicle: |
[[[
return `Vehicle: ${states['sensor.rocket_launch_1'].attributes['vehicle']}`
]]]
launch_pad: |
[[[
return `Launch Pad: ${states['sensor.rocket_launch_1'].attributes['launch_pad']}`
]]]
location: |
[[[
return `Location: ${states['sensor.rocket_launch_1'].attributes['launch_location']}`
]]]
target_date: |
[[[
return `Target Date: ${states['sensor.rocket_launch_1'].attributes['launch_date_target']}`
]]]
tags: |
[[[
return `Tags: ${states['sensor.rocket_launch_1'].attributes['tags']}`
]]]
- type: 'custom:button-card'
entity: sensor.rocket_launch_2
show_name: false
show_state: true
show_icon: false
layout: icon_state
styles:
card:
- font-size: 12px
- padding: 10px
grid:
- grid-template-areas: >-
"s" "provider" "vehicle" "launch_pad" "location" "target_date"
"tags"
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content min-content
state:
- font-weight: bold
- font-size: 16px
- align-self: start
- justify-self: start
custom_fields:
provider:
- align-self: start
- justify-self: start
vehicle:
- align-self: start
- justify-self: start
launch_pad:
- align-self: start
- justify-self: start
location:
- align-self: start
- justify-self: start
target_date:
- align-self: start
- justify-self: start
tags:
- align-self: start
- justify-self: start
custom_fields:
provider: |
[[[
return `Provider: ${states['sensor.rocket_launch_2'].attributes["provider"]}`
]]]
vehicle: |
[[[
return `Vehicle: ${states['sensor.rocket_launch_2'].attributes['vehicle']}`
]]]
launch_pad: |
[[[
return `Launch Pad: ${states['sensor.rocket_launch_2'].attributes['launch_pad']}`
]]]
location: |
[[[
return `Location: ${states['sensor.rocket_launch_2'].attributes['launch_location']}`
]]]
target_date: |
[[[
return `Target Date: ${states['sensor.rocket_launch_2'].attributes['launch_date_target']}`
]]]
tags: |
[[[
return `Tags: ${states['sensor.rocket_launch_2'].attributes['tags']}`
]]]
- type: 'custom:button-card'
entity: sensor.rocket_launch_3
show_name: false
show_state: true
show_icon: false
layout: icon_state
styles:
card:
- font-size: 12px
- padding: 10px
grid:
- grid-template-areas: >-
"s" "provider" "vehicle" "launch_pad" "location" "target_date"
"tags"
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content min-content
state:
- font-weight: bold
- font-size: 16px
- align-self: start
- justify-self: start
custom_fields:
provider:
- align-self: start
- justify-self: start
vehicle:
- align-self: start
- justify-self: start
launch_pad:
- align-self: start
- justify-self: start
location:
- align-self: start
- justify-self: start
target_date:
- align-self: start
- justify-self: start
tags:
- align-self: start
- justify-self: start
custom_fields:
provider: |
[[[
return `Provider: ${states['sensor.rocket_launch_3'].attributes["provider"]}`
]]]
vehicle: |
[[[
return `Vehicle: ${states['sensor.rocket_launch_3'].attributes['vehicle']}`
]]]
launch_pad: |
[[[
return `Launch Pad: ${states['sensor.rocket_launch_3'].attributes['launch_pad']}`
]]]
location: |
[[[
return `Location: ${states['sensor.rocket_launch_3'].attributes['launch_location']}`
]]]
target_date: |
[[[
return `Target Date: ${states['sensor.rocket_launch_3'].attributes['launch_date_target']}`
]]]
tags: |
[[[
return `Tags: ${states['sensor.rocket_launch_3'].attributes['tags']}`
]]]
- type: 'custom:button-card'
entity: sensor.rocket_launch_4
show_name: false
show_state: true
show_icon: false
layout: icon_state
styles:
card:
- font-size: 12px
- padding: 10px
grid:
- grid-template-areas: >-
"s" "provider" "vehicle" "launch_pad" "location" "target_date"
"tags"
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content min-content
state:
- font-weight: bold
- font-size: 16px
- align-self: start
- justify-self: start
custom_fields:
provider:
- align-self: start
- justify-self: start
vehicle:
- align-self: start
- justify-self: start
launch_pad:
- align-self: start
- justify-self: start
location:
- align-self: start
- justify-self: start
target_date:
- align-self: start
- justify-self: start
tags:
- align-self: start
- justify-self: start
custom_fields:
provider: |
[[[
return `Provider: ${states['sensor.rocket_launch_4'].attributes["provider"]}`
]]]
vehicle: |
[[[
return `Vehicle: ${states['sensor.rocket_launch_4'].attributes['vehicle']}`
]]]
launch_pad: |
[[[
return `Launch Pad: ${states['sensor.rocket_launch_4'].attributes['launch_pad']}`
]]]
location: |
[[[
return `Location: ${states['sensor.rocket_launch_4'].attributes['launch_location']}`
]]]
target_date: |
[[[
return `Target Date: ${states['sensor.rocket_launch_4'].attributes['launch_date_target']}`
]]]
tags: |
[[[
return `Tags: ${states['sensor.rocket_launch_4'].attributes['tags']}`
]]]
- type: 'custom:button-card'
entity: sensor.rocket_launch_5
show_name: false
show_state: true
show_icon: false
layout: icon_state
styles:
card:
- font-size: 12px
- padding: 10px
grid:
- grid-template-areas: >-
"s" "provider" "vehicle" "launch_pad" "location" "target_date"
"tags"
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content min-content
state:
- font-weight: bold
- font-size: 16px
- align-self: start
- justify-self: start
custom_fields:
provider:
- align-self: start
- justify-self: start
vehicle:
- align-self: start
- justify-self: start
launch_pad:
- align-self: start
- justify-self: start
location:
- align-self: start
- justify-self: start
target_date:
- align-self: start
- justify-self: start
tags:
- align-self: start
- justify-self: start
custom_fields:
provider: |
[[[
return `Provider: ${states['sensor.rocket_launch_5'].attributes["provider"]}`
]]]
vehicle: |
[[[
return `Vehicle: ${states['sensor.rocket_launch_5'].attributes['vehicle']}`
]]]
launch_pad: |
[[[
return `Launch Pad: ${states['sensor.rocket_launch_5'].attributes['launch_pad']}`
]]]
location: |
[[[
return `Location: ${states['sensor.rocket_launch_5'].attributes['launch_location']}`
]]]
target_date: |
[[[
return `Target Date: ${states['sensor.rocket_launch_5'].attributes['launch_date_target']}`
]]]
tags: |
[[[
return `Tags: ${states['sensor.rocket_launch_5'].attributes['tags']}`
]]]
```