Hi Lozinoz, the full automation I have is below. Sorry for the delay been busy with life lol. whatever I’m doing it is not speaking. Even though HA recommends tts.speak I am trying tts.say today. I can confirm tts.say did not work, HA says it doesn’t exist, so I went back to tts.speak, still no response. Sorry to be a pain lol
If it helps info about my HA
- Installation method Home Assistant Container
- Core 2025.5.3
- Frontend 20250516.0
description: Aircraft entered watch zone around home so notify with audio
triggers:
- event_type: flightradar24_entry
trigger: event
conditions:
- condition: time
after: "06:00:00"
before: "19:00:00"
actions:
- alias: Announce aircraft with plain TTS
action: tts.speak
data:
entity_id: media_player.living_room_display
message: "{{ announce_details }}"
variables:
flight_data: "{{ trigger.event.data if trigger.event.data is defined else {} }}"
announce_details: |-
{% set announce_details = [] %} {% if not flight_data %}
{% set announce_details = ['No aircraft detected entering area'] %}
{% else %}
{% set announce_details = ['Flight nearby is'] %}
{# add aircraft airline name (short version) if available from detected aircraft #}
{% if flight_data.get('airline_short') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + [flight_data.airline_short] %}
{% endif %}
{# add aircraft flight number if available from detected aircraft #}
{% if flight_data.get('flight_number') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + ['Flight ' ~ flight_data.flight_number] %}
{% endif %}
{# add aircraft registration if available from detected aircraft #}
{% if flight_data.get('aircraft_registration') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + ['Registed as ' ~ flight_data.registration] %}
{% endif %}
{# add aircraft model if available from detected aircraft #}
{% if flight_data.get('aircraft_model') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + [flight_data.aircraft_model.split('-')[0]] %}
{% endif %}
{# add aircraft (origin and destination)airport name if available from detected aircraft #}
{% if flight_data.get('airport_origin_name') and flight_data.get('airport_destination_name') %}
{% set announce_details = announce_details + ['from ' ~ flight_data.airport_origin_name ~ ' to ' ~ flight_data.airport_destination_name] %}
{% endif %}
{# add aircraft distance from tracking location if available from detected aircraft #}
{% if flight_data.get('distance') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + ['aircraft is ' ~ (flight_data.distance | round(0, 'floor')) ~ ' km away'] %}
{% endif %}
{# add aircraft altitude (in feet) if available from detected aircraft #}
{% if flight_data.get('altitude') not in [None, 'unknown', ''] %}
{% set announce_details = announce_details + ['at ' ~ (flight_data.altitude | round(0, 'floor')) ~ ' feet'] %}
{% endif %}
{# add compass bearing (after calculating) of aircraft if available from detected aircraft #}
{% if flight_data.get('heading') not in [None, 'unknown', ''] %}
{% set compass_directions = ['North', 'North-Northeast', 'Northeast', 'East-Northeast', 'East', 'East-Southeast', 'Southeast', 'South-Southeast', 'South', 'South-Southwest', 'Southwest', 'West-Southwest', 'West', 'West-Northwest', 'Northwest', 'North-Northwest'] %}
{% set heading_index = ((flight_data.heading | float(0) + 11.25) // 22.5) | int %}
{% set heading_direction = compass_directions[heading_index % 16] %}
{% set announce_details = announce_details + ['Heading ' ~ heading_direction] %}
{% endif %}
{% endif %} {{ announce_details | join(', ') }}
type or paste code here