2018-01-02 00:00:45 +00:00
|
|
|
#-------------------------------------------
|
|
|
|
# Space Related Packages
|
|
|
|
# @CCOSTAN
|
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
|
|
#-------------------------------------------
|
2024-09-18 17:43:14 +00:00
|
|
|
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
sensor:
|
2018-12-05 19:38:00 +00:00
|
|
|
|
2020-07-11 15:26:42 +00:00
|
|
|
- platform: rest
|
|
|
|
scan_interval: 1800
|
|
|
|
name: SpaceX Starman
|
|
|
|
json_attributes:
|
|
|
|
- earth_distance_mi
|
|
|
|
value_template: '{{ value_json["speed_mph"] }}'
|
|
|
|
unit_of_measurement: "mph"
|
|
|
|
resource: 'https://api.spacexdata.com/v2/info/roadster'
|
|
|
|
|
|
|
|
- platform: rest
|
|
|
|
scan_interval: 1800
|
|
|
|
name: SpaceX
|
|
|
|
json_attributes:
|
|
|
|
- mission_name
|
|
|
|
- launch_site
|
|
|
|
- rocket
|
|
|
|
value_template: '{{ value_json["launch_date_unix"] }}'
|
|
|
|
resource: 'https://api.spacexdata.com/v2/launches/next'
|
|
|
|
|
2018-01-02 00:00:45 +00:00
|
|
|
automation:
|
|
|
|
- alias: Launch Window Approaching
|
2020-07-20 18:33:03 +00:00
|
|
|
id: 1d42fc4f-a37d-4283-b64b-09242a145598
|
2018-01-02 00:00:45 +00:00
|
|
|
trigger:
|
2020-07-11 19:01:53 +00:00
|
|
|
- platform: template
|
|
|
|
value_template: '{{ (now().strftime("%s") | int + 600) == (states.sensor.spacex.state | int) }}'
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
action:
|
|
|
|
- service: script.notify_engine
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2020-07-11 19:01:53 +00:00
|
|
|
value1: 'Go Outside! There is a Rocket Launch very soon! {{states.sensor.next_launch.attributes.stream }}'
|
2023-11-17 22:16:41 +00:00
|
|
|
group: 'information'
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
|