I might be a little space obsessed, but after putting out my SpaceX sensors integration, I figured I would like to also be aware of other non-SpaceX launches that I might get a chance to watch.
I released the first version of my Rocket Launch Live - Next 5 Launches integration last night at https://github.com/djtimca/harocketlaunchlive (compatible with HACS custom repository install).
This integration uses the free rocketlaunch.live API for the next 5 launches and currently adds 5 sensors (one for each launch) with a ton of information in the attributes for each launch. I expect to add launch warnings etc like in my SpaceX Integration but need to monitor the data for a bit to understand how/when it will come in.
Happy to get testing feedback and suggestions as well.
I am currently showing the launch info using the custom:button-card (from HACS) in my Lovelace with the following YAML:
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']}`
]]]