Automation to announce Sunset Time

I have the following automation that alerts me that the sun will set in 30 minutes. How can I get this automation to alert me that the Sun will set at at the actual time instead of in 30 minutes. For example, message: The Sun will set today at (current sunset time )

 Sunset Alert
description: ''
trigger:
  - platform: sun
    event: sunset
    offset: '-00:30:00'
condition: []
action:
  - service: media_player.volume_set
    data:
      volume_level: 0.45
    target:
      device_id:
        - 4fdad7daa9d5fd6cd6bf31bb80d17dc8
  - service: tts.google_translate_say
    data:
      entity_id: media_player.family_room_speaker
      message: The Sun will set in 30 minutes
      cache: true
mode: single
      message: "The Sun will set at {{ state_attr('sun.sun', 'next_setting') | as_timestamp | timestamp_custom('%H:%M') }}"
1 Like

Just what I needed to point me in the right direction. After a bit of tweaking I have it exactly like I wanted it.

Many thanks…

1 Like