Trigger automation with Launch Library entity?

Was delighted today to find the “Launch Library” integration today…
… Then bummed when I couldn’t find a way to get an automation to trigger from the time-to-launch sensor.

What does it take to get sensors like those to be exposed as a trigger for an automation?

Use them in a Time trigger…

trigger:
  - platform: time
    at: sensor.next_launch_launch_time

Drew, thanks for the clue. Not trying to be dense, but in what for is that used?

Today I stumbled on your same problem :slight_smile: If you want we can try and solve it together. I will start with this automation and will improve it along the way.
For now this will send a notification when launch time is lest than 1 day (to be honest I dont think this will work but this is a start)

alias: Next Rocket Launch
description: Next Rocket Launch
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.next_launch_launch_time
    below: 1
condition: []
action:
  - data:
      title: Rocket Launch
      message: >-
        Next Launch: {{ states('sensor.next_launch_launch_mission') }}  Time: {{
        states('sensor.next_launch_launch_time') }} Probability: {{
        states('sensor.next_launch_launch_probability') }} Status: {{
        states('sensor.next_launch_launch_status') }}
    service: notify.mobile_app_mi_9t_pro
mode: single

Hey! Just noticed your message, and I’d like to work on that automation with you, as you suggested… just as soon as I fix this @#$!@ WLED problem (hopefully sometime tonight).

That trigger will never fire because the sensor’s state is a datetime string not a number. You could use a numeric state trigger if you added a value_template, but it would be easier to just use a template trigger:

trigger:
  - platform: template
    value_template:  "{{ now() >= states('sensor.next_launch_launch_time')|as_datetime - timedelta(days=1) }}"