Closed wernerhp closed 3 years ago
See https://github.com/home-assistant/architecture/issues/38 for the existing suggestion.
Thanks @MartinHjelmare I saw that one, but it seemed very old and there was a PR for it, so I thought it was completed.
It's not completed. I did some clean up as a start of that plan.
Context
The existing
CalendarEventDevice
is pretty outdated. The state is shown ason
andoff
instead of a more relevantfree
andbusy
. It only shows a single upcoming event in itsstate_attributes
, which means if there are multiple events happening at the same time, that only one is shown. If there is an all day event, no other events are shown.CalendarEventView
does an API call every time it's called, which is slow. It's aDevice
Proposal
Deprecate the current
CalendarEventDevice
Add a newCalendarEntity
.https://github.com/wernerhp/core/commit/22578df32c3fdb988b270cb1ab9f134c2a91bf59
Consequences
A new
CalendarEntity
thatstate_attributes
(likeweather.forecast
)CalendarEventView
that returns events for aday
,week
,month
orschedule
viewCalendarEvent(ABC)
that makes it easy to create and extend calendar events.The old calendar integration will be used when configuring the component via
configuration.yaml
. The new calendar integration will be used when configuring the component viaConfigFlow
.This serves as a primer to a new Google calendar platform integration, which will include a
ConfigFlow
with Google OAuth2. This calendar integration will support Google Calendar API and Google People API (for a contact events calendar supporting Birthdays, Anniversaries and other custom events).Downside...there will be two different calendar components for a while.