Updated to new home assistant services to fetch Forecast and Calendar Data
Version: 2.0
Allows you to use up to 3 calendars and 3 notify services to send the message.
Consider increasing the maximum tokens to return in a response to get the full information processed by ChatGPT as shown here. (400 - 500 would be a starting point, for two calendars)
This blueprint will send you a personalized message every morning to help you prepare for your day.
Using OpenIA conversation, it will generate a summarized message using the weather and your calendar information.
You can customize the prompt to get better-detailed messages according to your needs.
And also customize the time that the message is sent.
Need help? or Just want to say hi ?
Let me know what you think about this blueprint in the comments All feedback is welcome, so let me know if you have any questions.
I made a slight adaptation to display the notification on the dashboard. I find it convenient to be able to easily find the LLM’s response on my dashboard.
I have the same issue, but don’t have the ability to fix this either.
I was about to rebuild this as a standalone automation, but realised that this was waaaaay above my pay-grade!
@Martin_Granger and @fixt just FYI the orignal creator @allenporter has updated his amazing blueprint that resolves the calendar.get_events service change. Might be able to merge the changes, but I’ll just stick with his blueprint as getting notifications was my primary goal anyway.
Hey, thank you for the heads up, I’m about to start working on a fix, and this is great to start.
Sorry for the delay, I had this on my to-do list for months, but due to time constraints, I wasn’t able to work on it.
Hope I can have the fixed version working after this week’s video release, but wanted to let you know that I’m finally working on it.
Found out that in multi calendar, the new get_calendar broke parsing, so I’ve rebuilt it:
{% set calendar_name = calendar_entity_1 %}
Calendar "{{ state_attr(calendar_entity_1, 'friendly_name') }}" events for the next {{ calendar_duration.hours }} hours:
{% set agenda = agenda_1[calendar_name] if calendar_name in agenda_1 else {} %}
{% if agenda.events %}
{% for event in agenda.events %}
- Summary: {{ event.summary }}
Start-End: {% if event.start is defined %}{{ event.start }} to {{ event.end }}{% else %}All Day{% endif %}
{% if event.description is defined %}
Description: {{ event.description }}
{% endif %}
{% if event.location is defined %}
Location: {{ event.location }}
{% endif %}
{% endfor %}
{% else %}
- No upcoming events.
{% endif %}
{%- if (calendar_number == "two") or (calendar_number == "three") %}
Calendar "{{ state_attr(calendar_entity_2, 'friendly_name') }}" events for the next {{ calendar_duration.hours }} hours:
{% set agenda = agenda_2['calendar_entity_2'] if 'calendar_entity_2' in agenda_2 else {} %}
{% if agenda.events %}
{% for event in agenda.events %}
- Summary: {{ event.summary }}
Start-End: {% if event.start is defined %}{{ event.start }} to {{ event.end }}{% else %}All Day{% endif %}
{% if event.description is defined %}
Description: {{ event.description }}
{% endif %}
{% if event.location is defined %}
Location: {{ event.location }}
{% endif %}
{% endfor %}
{% else %}
- No upcoming events.
{% endif %}
{%- endif %}
{%- if (calendar_number == "three") %}
Calendar "{{ state_attr(calendar_entity_3, 'friendly_name') }}" events for the next {{ calendar_duration.hours }} hours:
{% set agenda = agenda_3['calendar_entity_3'] if 'calendar_entity_3' in agenda_3 else {} %}
{% if agenda.events %}
{% for event in agenda.events %}
- Summary: {{ event.summary }}
Start-End: {% if event.start is defined %}{{ event.start }} to {{ event.end }}{% else %}All Day{% endif %}
{% if event.description is defined %}
Description: {{ event.description }}
{% endif %}
{% if event.location is defined %}
Location: {{ event.location }}
{% endif %}
{% endfor %}
{% else %}
- No upcoming events.
{% endif %}
{%- endif %}
Also, this was needed for google calendar, and in my setup, by adding the ollama integration, you could also run the assistant FULLY locally (except for the google calendar bit)
I am having issues with a O365 calendar. The meetings for the next week are shown in the entity as well as the default calendar view but when using this blueprint the response I get is that there are no events. I have the blue print set to look out 120 hours in the future and it works if I use a different calendar. It seems to be just this calendar that is affected.
I’m getting this error when i try to run the blueprint. The error is “Weather entity ‘weather.accuweather’ does not support ‘hourly’ forecast” Where do i get the hourly forecast?