Updating the Rocket Launch sensor a bit more. #411

This commit is contained in:
ccostan 2018-12-05 14:36:54 -05:00
parent 671d49ee40
commit 01c088c803
3 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,7 @@ sensor:
- platform: moon
- platform: rest
scan_interval: 3600
scan_interval: 1800
resource: https://launchlibrary.net/1.2.2/launch/next/10
# resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json
name: launch window
@ -64,14 +64,16 @@ automation:
value_template: "{{as_timestamp(now()) < (states('sensor.launch_window') | float)}}"
action:
- wait_template: >-
{{as_timestamp(now()) >= ((states('sensor.launch_window') | float) - 1800)}}
- service: script.notify_engine
data_template:
value1: 'There will be a rocket Launch today - I will notify you later when the launch window starts'
- wait_template: >-
{{as_timestamp(now()) >= (states('sensor.launch_window') | float)}}
{{as_timestamp(now()) >= ((states('sensor.launch_window') | float) - 300)}}
- service: script.notify_engine
data_template:
value1: 'Go Outside! There is a Rocket Launch!'
value1: 'Go Outside! There is a Rocket Launch very soon!'
- service: script.tweet_engine
data_template:
@ -107,7 +109,7 @@ automation:
"/config/www/custom_ui/floorplan/images/branding/space2.png",
"/config/www/custom_ui/floorplan/images/branding/starman.png"
] | random }}
- alias: 'Full Moon -Tweet'
trigger:
- platform: state

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 100 KiB