Add MQTT Calendar Support

What?
Add support for being able to add calendar events to local calendar using MQTT topics and auto-discovery. This would make it possible for other programs outside Home Assistant to publish calendar events to Home Assistant, allowing automations and or dashboards for the data, or even for use in ESPHome devices for wall-calendar dashboards via the native api

How?
This could work by having the developer/person using MQTT to specify the Calendar event data in a specific way.
The discovery topic could be three separate like this:

/homeassistant/calendar/custom-cal-2-mqtt-name/event1/summary
/homeassistant/calendar/custom-cal-2-mqtt-name/event1/start_time
/homeassistant/calendar/custom-cal-2-mqtt-name/event1/end_time

Or perhaps a single json array?
/homeassistant/calendar/custom-cal-2-mqtt-name/calendar1/topic
which contains the json object topic to subscribe to:

/custom-cal-2-mqtt-name/calendar1/json:

{
  "events": [
    {
      "summary": "John's Birthday",
      "start_time": "2023-07-15T14:00:00+02:00",
      "end_time": "2023-07-15T16:00:00+02:00"
    },
    {
      "summary": "Meeting with Team",
      "start_time": "2023-07-20T10:00:00+02:00",
      "end_time": "2023-07-20T12:00:00+02:00"
    }
  ]
}

Potential issues
The current calendar supports modifying calendar events like delete, create etc. Adding support for external events like this might create the need for un-modifyable calendars/events, if that does not already exist?
Or,
The topic/discovery also providing a /command topic where home assistant can publish to update a calendar event. But not all sources might support this.

Another thought is which calendar do these events add to?
Maybe you specify the calendar name in the discovery topic?

Couple things:

  1. Changed the title.
  2. In order for there to be MQTT Calendar discovery, we need a calendar entity first. This FR should focus on that, because discovery will come along with it.
  3. Don’t forget to vote for your own FR.

Hi, thanks!

  1. What do you mean with we need a calendar entity first? Does those not already exist, for example for the local calendar and Epic Games integration etc? Like calendar.epic_games_store_discount_games

There is no such thing as an MQTT calendar entity.

Oh right! I missed that!

I’ve been working on my program that publishes calendar events to MQTT topics

This will be used together with ESP32 devices that display room bookings or if a meeting room is occupied. Wanted to create an easy open source solution. If Home Assistant gets MQTT Calendar support I’ll also add auto discovery to my app