Frontend: Calendar: Events missing in Monthly view

Created on 20 Sep 2020  路  6Comments  路  Source: home-assistant/frontend

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

The problem

Many calendar events are missing from the monthly view but show in the Weekly, Daily or Agenda views. The occurs in the Calendar in the left hand panel as well as the new Calendar Card.

Expected behavior

All events are show in the monthly view.

Steps to reproduce

Add google calendar integration with a bunch of events. View calendar or calendar card in monthly view. Some will be missing. If you toggle form Agenda / Daily view to Monthly view sometimes _some_ of the events show briefly then disappear.

Environment

  • Home Assistant release with the issue: 0.115.1
  • Last working Home Assistant release (if known): N/A
  • Browser and browser version: Safari 14.0 (macOS), Safari on iOs 13, Chrome 85.0.4183.102 on macOS, WallPanel on Android
  • Operating system: macOS / iOS / Android

State of relevant entities


Problem-relevant configuration

google:
  client_id: !secret google_client_id_calendar
  client_secret: !secret google_client_secret_calendar

Javascript errors shown in your browser console/inspector

No errors that I can find in the dev console in chrome

Additional information

Weekly view
Screen Shot 2020-09-19 at 8 03 46 PM

Monthly view. Most of the items seen in the weekly view are missing. Only one repeating event shows (red)
Screen Shot 2020-09-19 at 8 03 51 PM

bug

All 6 comments

I think this is due to the fact that with Google calendars, by default, the maximum number of events (per calendar) which will be returned by any query by date range is 5.

This is controlled by the max_results option for the calendar in the google_calendars.yaml and increasing this to a higher value should allow the events to appear:

https://www.home-assistant.io/integrations/calendar.google/#calendar-configuration

Yea I think this was an issue with the panel that was resolved via the integration.

I think this is due to the fact that with Google calendars, by default, the maximum number of events (per calendar) which will be returned by any query by date range is 5.

This was indeed the case for Google Calendar. I set the max_results value higher for some calendars and they all events appear in monthly view.

I'm usually pretty good about reading the doc thoroughly but the behaviour of this issue was/is odd in that it loads the events in different view fine and you can even see them briefly appear and disappear when toggling to monthly view, which sure seems like buggy behaviour. Honestly even reading the doc and even that specific setting might not have helped because the wording of "_Max number of entries to retrieve_" makes it sound like it will only pull / sync that number of entries from the Google servers whereas this is entirely a client-side display setting. The data was there and even shows for a brief time then disappears. Is it pulling from Google servers at render time? Like each time the view changes?

Yes. currently we have not created a caching system. I started to add it back on creation but the logic was to complicated for the MVP. It just needs to be re-added.

Ah gotcha. The settings makes more sense now. Wonder if a doc wording change is warranted though to make it more clear that it's the max number of entries that will render at a time for a given calendar. Might make it more clear.

Maybe. Feel free to go to the doc page and click the button at the top that says Edit this Page.

Then submit a PR to the Current Branch. Link this PR for reasoning on the change

Was this page helpful?
0 / 5 - 0 ratings