CalDAV doesn't generate binary_sensors?

The CalDAV integration’s documentation claims it generates binary_sensors for events. However, the only thing I get is a single calendar entity for the first of today’s events. There are other scheduled events today, and several more in the coming days, but none of them appear as entities in Developer Tools > States.

I’m using Radicale as a local CalDAV server. I connected to it with a calendar client (Evolution) and created several test events (a mix of hourly and all-day events).

I configured the CalDAV integration like this:

calendar:
  - platform: caldav
    username: redacted
    password: redacted
    url: http://localhost:5232/root/redacted/
    days: 7
    custom_calendars:
      - name: experiment
        calendar: 'Test Calendar'
        search: '.*'

There are no errors in the log and the events I created appear in Home Assistant’s Calendar view:


Everything looks good so far but when I check Developer Tools > States the only entity related to the calendar events is just one, today’s first event, and it’s a calendar entity:

Shouldn’t all the events be rendered as binary_sensors?

FWIW, the Calendar view works perfectly. It picks up all the events and identifies all-day events. However, the CalDAV integration isn’t doing what it’s documentation claims. Possibly due to an incompatibility with Radicale?

As an experiment, I tried another CalDAV server. I installed NextCloud, created a few test events, then configured the CalDAV integration like this:

calendar:
  - platform: caldav
    username: redacted
    password: redacted
    url: http://localhost:8080/remote.php/dav
    days: 7
    custom_calendars:
      - name: foo_test
        calendar: 'Foo'
        search: '.*'

The four test events are correctly displayed in the Calendar view:

However, once again, only today’s first event is rendered as a calendar entity. There are no binary_sensors generated for any of the remaining events.

Either I’m doing something consistently wrong, the documentation is in error or I’ve misunderstood it, or the integration isn’t working properly. :man_shrugging:

The last line of my previous post was prophetic:

Either I’m doing something consistently wrong, the documentation is in error or I’ve misunderstood it, or the integration isn’t working properly.

It appears to be a combination of me doing something wrong and the documentation being in error, or at the very least misleading.

The documentation refers to the creation of “binary sensors” but the integration (unless I’m mistaken yet again) only creates calendar sensors. They have a binary state (on/off) but have no association with the term “binary sensor” which is used to represent doors, windows, occupancy, etc. calendar and binary_sensor are two separate and independent entity domains.

Armed with this insight, I created the following configuration:

calendar:
  - platform: caldav
    username: redacted
    password: redacted
    url: http://localhost:8080/remote.php/dav
    days: 7
    custom_calendars:
      - name: Birthday
        calendar: 'Foo'
        search: '^Birthday*'
      - name: Appointment
        calendar: 'Foo'
        search: '^Appointment*'
      - name: Trash
        calendar: 'Foo'
        search: '^Trash*'
      - name: Walk
        calendar: 'Foo'
        search: '^Walk*'

That defines a separate custom_calendar for each event category (Birthday, Appointment, Trash, and Walk).

I defined several events in NextCloud:

and, after a restart, they appear like this in Developer Tools > States:

That’s more like what I had expected. Each upcoming event (in each category) is displayed as a separate calendar entity.

I thought I had resolved the issue until I examined Home Assistant’s Calendar view. Because it is capable of showing all four calendars, all events appear four times.

Is that considered to be “nominal”? Perhaps the way I created the four initial custom_calendars is incorrect?

The same problem in 0.114.4 with duplicated events in custom_calendars. See also https://github.com/home-assistant/core/issues/36039

The issue still present in 0.115.2.
Is it a real problem, or are we doing something wrong in the config?

It’s a UI issue with custom calendars, it doesn’t affect anything else.

:+1: Then, we will wait for a fix.