LLM Daily summary for voice assistant

I use the home assistant daily summary script to generate a summary at 6am every morning and send it to my phone as a notification.

However I would like to be able to ask my voice assistants to “tell me about my day”, I could use a sentence trigger to call the script and speak the response, however that means unnecessary and repeated calls to the LLM as well as a big delay, ideally I would like to save or cache the 6am response and simply use a sentence trigger to read it out to me.

Is anyone aware of how to do this? I tried using the text helper but it has a small character limit and does not preserve formatting.

Maybe this will help.
After creating the summary you could stream this to the media player with the volume set to 0 or just muted. If you tick the save in cache box then it is still there for you the next time.

1 Like

Good idea, any idea how to find the URL of the cached stream?

My understanding is that HA creates the hash for the cache filename. If the message don’t change then the hash will be the same and the chached version is used

But how do I send the same reply again, what would the action or automation look like?

You can place the summary in text field or helper first and use that. (Edit: i noticed that you tried a text helper already)

I do not use a LLM to create my summary anymore. I just collect the actual data from several entities in a template and send it to the media player when needed. The LLM put some randomiss in the output which makes caching less usefull.

data:
  cache: false
  entity_id: media_player.vlc_telnet
  language: nl
  message: >-
    Goeden morgen! Dit is het weerbericht voor vandaag.   {% set months =
    ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "July", "Agustus",
    "September", "October", "November", "December"] %} {% set days = ["Maandag",
    "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"]  %} 
    '{{ days[now().weekday()]}} {{ now().date().day }} {{ months[now().month-1]
    }}'    {% if is_state('sensor.weer_samenvatting_vandaag','unknown') %}
      '{{ states('sensor.weer_samenvatting_middel_lang') }}'
    {% else %}  
      '{{states('sensor.weer_samenvatting_vandaag') }}'
    {% endif %}  weerwaarschuwing.  '{{states('sensor.knmi_weercode') }}',  Dat
    betekend dat '{{states('sensor.knmi_weer_waarschuwing') }}'      {% if not
    is_state('sensor.afvalinfo_afval_voor_vandaag','geen') %}
      Niet vergeten. 
      Vandaag moet '{{ states('sensor.afvalinfo_afval_voor_vandaag') }}'
      aan de weg gezet worden.
    {% endif %}     Volgens de agenda staan er voor vandaag de volgende
    afspraken.     {% for i in range(0, 14) %}
      {% if is_state('sensor.ical_voor_omroep_event_' + i|string,'unavailable') %}
        {% elif as_timestamp(state_attr('sensor.ical_voor_omroep_event_' + i|string, "start"))|timestamp_custom('%-d') == as_timestamp(now()) | timestamp_custom('%-d') %}
          Afspraak om  
          '{{ as_timestamp(state_attr('sensor.ical_voor_omroep_event_' + i|string, "start")) | timestamp_custom('%H:%M') }}'
          '{{ state_attr('sensor.ical_voor_omroep_event_' + i|string, "summary") }}'
      {% endif %} 
    {% endfor%}  Dit waren de afspraken voor vandaag.
action: tts.google_translate_say