Random and template data

Hi guys

when I added template data to random I got an error.

do you have any idea?

thanks in advance

  - service: script.hassio_talk
   
    data_template:
        message: >
          {{ [
          "sunset will be" {{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %I:%M%p') | replace(" 0", "")}} "we become ready for it",
          "sunset is close! you see the really beautiful red sky at sunset",
          "Keep in mind that a sunset is a beautiful phenomenon. we are close to it"
          ] |random }}

I do it like this. Might be more elegant ways, but this works.

    - service: tts.google_say
      data_template: 
        message: >
          {% set now = now().strftime('%H %M') %}
          {% set r1 = "Oh, it's " + now + " already!" %}
          {% set r2 = "Ah, it's " + now + " already!" %}
          {% set r3 = "Eh, it's " + now + " already!" %}
          {{ [r1, r2, r3] | random }}