mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-07-23 03:52:02 +00:00
Spaceship updates - #411
This commit is contained in:
parent
a32b9bdc68
commit
7b110def1b
@ -15,6 +15,25 @@ sensor:
|
|||||||
|
|
||||||
- platform: moon
|
- platform: moon
|
||||||
|
|
||||||
|
- 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'
|
||||||
|
|
||||||
- platform: rest
|
- platform: rest
|
||||||
scan_interval: 1800
|
scan_interval: 1800
|
||||||
resource: https://launchlibrary.net/1.2.2/launch/next/10
|
resource: https://launchlibrary.net/1.2.2/launch/next/10
|
||||||
@ -50,7 +69,7 @@ automation:
|
|||||||
|
|
||||||
action:
|
action:
|
||||||
- wait_template: >-
|
- wait_template: >-
|
||||||
{{((as_timestamp(now()) - states('sensor.launch_window') | float) | abs < 601)}}
|
{{((as_timestamp(now()) - states('sensor.launch_window') | float) | abs < 301)}}
|
||||||
- service: script.notify_engine
|
- service: script.notify_engine
|
||||||
data_template:
|
data_template:
|
||||||
value1: 'Go Outside! There is a Rocket Launch very soon!'
|
value1: 'Go Outside! There is a Rocket Launch very soon!'
|
||||||
@ -58,7 +77,11 @@ automation:
|
|||||||
|
|
||||||
- service: script.tweet_engine_no_image
|
- service: script.tweet_engine_no_image
|
||||||
data_template:
|
data_template:
|
||||||
tweet: 'There is a Rocket launch happening right now! I can see it if I look closely. @BrianCribbs #SpaceX #Space'
|
tweet: >-
|
||||||
|
{{ [
|
||||||
|
"There is a Rocket launch happening right now! I can see it if I look closely. {{states.sensor.next_launch.attributes.stream }}",
|
||||||
|
"Check out {{ states('sensor.next_launch') }} on {{states.sensor.next_launch.attributes.stream }} right now. Launch Window is opening."
|
||||||
|
] | random + " #Space @BrianCribbs #SpaceX " }}
|
||||||
|
|
||||||
# This automation was also moved to a macro in the speech_engine.
|
# This automation was also moved to a macro in the speech_engine.
|
||||||
# It's a random fact now.
|
# It's a random fact now.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user