Automation - How to show 4x Google calendar events instead of 1?

Hi,
I have a problem with the calendar, the calendar works but only shows 1 event/message. Only “Plastic” instead of Plastic, Mixed, Glass, etc.

Displays yes, this is not correct:

Check the calendar for what they’re taking tomorrow and prepare your trash. Hold down to enter the calendar. Plastic

That would be correct:

Check the calendar for what they’re taking tomorrow and prepare your trash. Hold down to enter the calendar. Plastic, Mixed, Glass

Code:

  - alias: waste_collection_nova
    id: '29382392022850'
    mode: single
    max_exceeded: silent
    trigger:
     - platform: calendar
       event: start
       entity_id: calendar.garbage_nova
       offset: "-16:00:00"
     - platform: calendar
       event: start
       entity_id: calendar.garbage_nova
       offset: "-5:00:00"
    action:
      - service: notify.all_devices
        data:
          title: >
            {{ '\u267B' }} Garbage on Nova tomorrow
          message: Check the calendar for what they're taking tomorrow and prepare your trash. Hold down to enter the calendar. {{ state_attr('calendar.garbage_nova', 'message') | replace (' Nova', '') }}
          data:
            # iOS URL
            url: "/calendar"
            # Android URL
            clickAction: "/calendar"
            sticky: "true"
      - delay:
          seconds: 5

There are 4 messages in the calendar, and on the notification it shows only Plastic. How should I do it?

{{ state_attr(‘calendar.garbage_nova’, ‘message’) }}
x4?

Are you saying there are 4 separate events right now and you only get one trigger?

If they trigger at the same time it may be the ‘mode’ is not set to run more than one in parallel.

Thanks, I hadn’t noticed that. There are 4 events in the calendar. The idea is to make {{ state_attr('calendar.garbage_nova', 'message') }} display 4 messages (from 4 events), not one. I just don’t know how to do it.

Yes, that is a problem with the calendar entity and why triggers were created. The trigger data for each event should be present in the payload following the examples in Calendar - Home Assistant

However, it sounds like the problem is combining data from multiple triggers so you can access them. You need to know when you have received all the triggers and when they are done, which I don’t know how to do. We are looking at ways to “query” the calendar, but no APIs for that yet.

Maybe this will help:

1 Like