To improve local calendar HA action : calendar.edit_event and calendar.delete_event

Today, with local calendar, only 2 actions are available:

  • calendar.create_event
  • calendar.get_events

In my point of view, It missing 2 actions to get full power on calendar:

  • calendar.edit_event => possibility to change startday, endday, summary, etc…
  • calendar.delete_event => opposite of create

Besides, I would like to be able to access to calendar object through templating.
The following exemple in documentation should works also in the develpoment editor:

    Your school calendar for today:
    {% for event in agenda["calendar.school_calendar"]["events"] %}
    {{ event.start}}: {{ event.summary }}<br>
    {% endfor %}
    Your work calendar for today:
    {% for event in agenda["calendar.work_calendar"]["events"] %}
    {{ event.start}}: {{ event.summary }}<br>
    {% endfor %}

But currently variable agenda does not exists :weary: so sad

The example works as soon as you execute the service call and save the result to a variable named “agenda”. This is what the example relates to. You can do this in an automation as a first step and access the events afterwards.

Afaik the direct access through templating is not possible.

It does’t exist because you didn’t create it. You just need to give the template some data to work with.

Use Dev Tools → Action to get your calendar events. You would use calendar.school_calendar. I used one of my calendars here to get some data.

The response will appear below the action call after you run the action.


Below the response is the option to copy the response in template style.

Copy the response and paste it in the template editor. You will have to rename action_response to agenda to work with your template code.