GPT Multi Calendar Agenda notification

I am also receiving this error. Started I believe with this months major HA release

1 Like

For weather entities, the fotecast attribute was removed, which breaks this blueprint.

Hello, thank you for this blueprint.

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.

Here is the code I added:

  • alias: Save speech

service: input_text.set_value

target:

entity_id: input_text.speech

data:

value: “{{ agent.response.speech.plain.speech }}”

With a help from discussion to original blueprint I’ve fixed the issue with forecast attributes like this:

add this:

- alias: Get Weather Forecast
  service: weather.get_forecasts
  data:
    type: daily
  target:
    entity_id: !input weather_entity
  response_variable: weekly_weather_forecast

and in text replace section {%- if weather_entity ... {%- endif %}

with this:

{%- if weather_entity is defined %}
        {%- set temperature_unit = state_attr(weather_entity, 'temperature_unit') -%}
        {%- set todays_forecast = weekly_weather_forecast[weather_entity]['forecast'][0] %}
        Weather: {{ todays_forecast.condition }} ({{ todays_forecast.temperature }}{{ temperature_unit }}, {{ todays_forecast.precipitation }}% precipitation)
        {%- endif %}
1 Like

Does anyone have the skill to update this due to the breaking change of removing calendar.list_events and switching to calendar.get_events

Documentation

1 Like

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!

@fixt would you like assistance fixing this?

@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.

1 Like

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.

1 Like

Updated to use the new Home Assistant Services for fetching information

1 Like

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)

Any way to add the to do list to the blueprint with the calenders?

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.

alias: Multi Calendar Conversation agent agenda notification
description: ""
use_blueprint:
  path: fixtse/multiple_notify_agent_calendar_agenda.yaml
  input:
    calendar_entity_1: calendar.elevation_calendar
    calendar_number: one
    calendar_duration:
      hours: 120
      minutes: 0
      seconds: 0
    weather_entity: weather.home
    zone_entity: zone.home
    notify_service_1: notify.pottshomebot
    conversation_agent: conversation.chatgpt

Is this working for anyone?

I’m having the exact same problem as you, however in my case I’m using gmail calendar.

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?

Weather forecast in Core has changes in the last month.
You will need to modify this or contact the original author to get a fix, most likely.

Weather - Home Assistant.

Definitive guide to Weather integrations 🌦.

Fixed it, I was using the wrong variable for the calendar 1, calendar 2 and 3 should have been working.

Thank you for the quick update!

I’m getting a response with my events now but they’re 6 hours off. My 10:00 am meeting is being reported at 4:00 pm.

Would it be possible to have a day of the week option also? In my case I’d like to send one for the whole week Sunday evening.

My calender is not working anymore. I get an error when trying to run the blueprint.

Stopped because an error was encountered at August 20, 2024 at 4:56:44 PM (runtime: 0.06 seconds)

Entity weather.openweathermap does not support this service.