The various calendar integrations available right now either focus on creating binary sensors for event triggering or showing calendar events within Lovelace. I’m looking for a simple solution that allows Home Assistant allows me to send my appointments as notifications or to have the read out to me using TTS. I should be able to send the first upcoming appointment, all appointments for today, the next appointment tomorrow and all appointments for tomorrow. There should also be an automation trigger that fires x minutes before the event in the calendar where x is configurable.
WTH is calendar a binary sensor indeed?
I’ve always found this odd. I can understand the usefulness of a binary calendar sensor for automations. But a sensor with a list of events, their dates, summary,… would be more useful for most scenario’s. It would also eliminate the need for custom calendar cards as you could just use a markdown card or whatever to display your events as you like.
Have built myself a custom sensor now to work around this (and the broken caldav integration, see other wth post), but having a standard calendar sensor that works like this would be great.
Maybe the upcoming events could be available as an attribute on the calendar binary sensor?
There should also be an automation trigger that fires x minutes before the event in the calendar where x is configurable.
Currently you can define an offset (at least with the Google calendar integration) but only for individual events. You need to put something like
!!-15 in the event title for the binary sensor to be triggered 15 minutes before the event starts. It would be nice to be able to set this on a per calendar basis or for the integration as a whole, so we don’t need to set this in the event titles.
This is exactly my point. I want to read out my appointments in the way they are entered in the calendar. I’m not gonna ask my girlfriend to add stuff like that in the event title when she enters for instance a dinner with friends in our family calendar but I would like to be informed about the the day before, that morning or even x minutes in advanced. This really is not much to ask as other domotica systems already have this kind of functionality.
Originally, I installed radicale and experimented with the CalDav integration. All I wanted to do is set a few ‘all-day’ events like birthdays and holidays. I was not fond of the binary_sensor approach to handling events, nor with the seemingly jury-rigged way of indicating advance-notice.
I gave up and turned to mf_social’s date_countdown python_script. It creates sensors that report the number of days remaining until the event (as opposed to a binary_sensor that only activates on the day of the event).
I used it as the basis for writing a completely new python_script that supports reminders (and several other things). For example, if you were to add this to an event:
reminder: '0 1 7 14'
It means to provide a reminder on the day of the event, the day before, 1 week before, and 2 weeks before it. The reminder can be an auto-generated message, based on the event’s category (birthday, wedding, anniversary, holiday, other) like:
In 1 week it will be John's 37th birthday. Tomorrow is Jane's 50th birthday.
or a custom message you define (that can support variables). This serves my needs better for announcing recurring events.
Major North American holidays are included and it supports floating holidays (an event whose date changes every year) so all you need to do is:
holiday: - name: thanksgiving_usa reminder: '3 7' message: 'D# days until Turkey Day.' - name: memorial reminder: '0 3' - name: easter reminder: '0 7'
and it calculates the correct day. You can also specify dates based on
cron syntax in order to provide scheduling flexibility like ‘Every second Wednesday in August and September’.
What it’s not designed to do is schedule hourly events; it’s just for all-day events. Anyway, this serves my needs better than the calendar integrations I’ve tried.
To display the events I’ve defined in Home Assistant’s Calendar view, I use Steven_Rollason’s Entities Calendar custom_component.
There is a PR in the frontend currently that will add a Calendar Card to Lovelace. Hoping to get this implemented by this next release or the one after