How to use calendar feature in home assistant

Hello,
I would like to implement an integration that will use HA calendar feature.
Does anyone can give me a good start point ?

In https://developers.home-assistant.io/, I’ve not seen from which point I can start.

I have to import : from homeassistant.components.calendar import PLATFORM_SCHEMA, CalendarEventDevice
Do you have an easy example ?

Thanks in advance
Philippe

Probably worth looking at the core Google integration, core/homeassistant/components/google at dev · home-assistant/core · GitHub or the O365 integration, GitHub - RogerSelwyn/O365-HomeAssistant: Office 365 integration for Home Assistant

2 Likes

Thanks for your quick answer !
I will read your code

Hello,
Thanks again.
It was a little tricky to get the event format.(use dateTime attributes instead of date).

For the ones who want to see https://github.com/jugla/worldtidesinfocustom/blob/e75c017a619792f0bfb766e4b826bb8242ccfda1/custom_components/worldtidesinfocustom/calendar.py

Just a warning, the calendar API is going to change to be much simpler to implement: Add a CalendarEntity documentation by allenporter · Pull Request #1256 · home-assistant/developers.home-assistant · GitHub – hopefully easier next time.

It sounds good :slight_smile: