Hello,
little help here, i can’t understand if events in Local calendar have an unique id or not.
I have some automation notifying upcoming events and i’d like to make the notification actionable opening the specific event popup on mobile, but i can’t find a “id” in the trigger event (or, more generally, an “id” at all when speaking of local calendar events)
Am i missing something?
Thanks
Here’s what is available for a Calendar Trigger.
What gave you the impression that there’s an id
property?
this:
trigger.calendar_event The calendar event object matched.
but i could not access its id, thats the reason of the question
Post the automation you created, specifically its Calendar Trigger. I need to see how you configured its id
property.
Reference
Trigger ID
Well the question is about me not being able to use the event id, so this is not in the automation, but here it is:
alias: Calendar notify
description: ""
trigger:
- platform: calendar
event: start
offset: "-1:0:0"
entity_id: calendar.my_events
condition: []
action:
- service: notify.mobile_app_mymobile
data:
title: Event
message: " {{ trigger.calendar_event.summary }} today starting {{ (trigger.calendar_event.start | as_datetime).strftime('%H:%M') }} until {{ (trigger.calendar_event.end | as_datetime).strftime('%H:%M') }}"
I’d like to open the more info panel for the specific event, but with no id i can’t do this.
thanks
If your automation’s Calendar Trigger included an id
option like this:
- platform: calendar
event: start
offset: "-1:0:0"
entity_id: calendar.my_events
id: hello
Then the trigger
object can reference it with trigger.id
but that’s not what you want.
If I understood you correctly, what you want is to reference the “id” of whichever Calendar event was responsible for triggering the Calendar Trigger. However, a Calendar event doesn’t have an “id” or “event id” property.
The only Calendar event properties reported by a Calendar Trigger are the ones shown in the link I posted above, namely these:
That’s why I asked what gave you the impression that there’s such a thing as an “id” in the trigger event.