Closed ohuc closed 1 month ago
Hi
I think it is better to keep the integration simple to make it easy to use. As it has a lot of parameters to allow a user make his own automation to succeed any user goals.
But remember that half of the duration of its flight time is estimated and cannot be accurate!
To make this automation 1) You need to create Date and Time ISO sensor https://www.home-assistant.io/integrations/time_date 2) Edit this automation triggering half flight notification for your needs
alias: Half flight notification
description: ""
trigger:
- platform: event
event_type: flightradar24_area_took_off
condition: []
action:
- wait_template: "{{ as_timestamp(states('sensor.date_time_iso')) >= half_time|int }}"
- service: notify.persistent_notification
data:
message: Half flight - {{ half_time}}
variables:
half_time: >-
{% set flight = trigger.event.data %}{{(flight.time_scheduled_arrival|int -
flight.time_scheduled_departure|int)/2 +
as_timestamp(states('sensor.date_time_iso'))}}
mode: parallel
a event which can allow us to know, when a flight reaches half of the duration of its total time would be highly useful!