higher maxDaysToShow results in events beeing lost
See original GitHub issueHi, I want my dashboard in Home Assistant to show the next 3 events. So I limit the count maxEventCount: 3
. If I set maxDaysToShow: 7
and there are only 2 events in that range - but I want to always display 3 - the logical thing is to just increase it to: maxDaysToShow: 30
. If I do that, then events that are already in the next days get lost and some other events are shown. It seems to be not chronological.
Another example: Today (14.7.) I have the following events: 15.7.: 2 events 16.7.: 1 event 19.7.: 1 event
When using maxDaysToShow: 7
with 3 events only one of the events on 15.7. is shown (and the next 2). But when I limit maxDaysToShow: 5
it shows the 2 events of 15.7. and the one on 16.7. So I’m very positive that this is a sorting issue.
See screenshots for the visuals.
Expected behaviour
The events should always be retrieved and shown in chronological order.
Current behaviour
Some events get lost when increasing the amount of days to look ahead.
Screenshot
Possible reasons and solutions
I guess it’s a chronological issue.
Steps to reproduce
Have some events, display only 3 events and increase the amount of days.
Context
I’m losing data which is annoying.
Custom values
- type: custom:atomic-calendar-revive
entities:
- entity: calendar.default_calendar
firstDayOfWeek: 1
maxDaysToShow: 7
name: Events
showDate: true
sortByStartTime: false
showLocation: false
showDeclined: false
showLoader: false
hideFinishedEvents: false
showRelativeTime: false
dateFormat: LL
showCurrentEventLine: false
showProgressBar: false
showWeekDay: true
showMonth: false
showDescription: false
disableEventLink: false
showNoEventsForToday: false
showEventIcon: false
disableLocationLink: false
showFullDayProgress: false
showHiddenText: false
calShowDescription: false
showLastCalendarWeek: false
disableCalEventLink: false
disableCalLocationLink: false
disableCalLink: true
dimFinishedEvents: true
cardHeight: 100%
maxEventCount: 3
Your environment
Home Assistant Docker Image: homeassistant/home-assistant:2021.6.6 HACS: 1.13.2 Atomic Calender Revive: v4.5.0 The Calendar I’m using is a CalDAV selfhosted: Baikal
Stack trace / logging
Checklist
- I searched the current issues and the issue is not known.
- I searched the troubleshooting and there’s no fix available for this bug.
- I searched on Google, YouTube, Reddit and there’s no fix.
- I am mostly sure that the problem is related to the code and isn’t my fault.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
Thanks for all the information, I will need to test and see what is happening here.
The calendar will now sort all events in date order and then do any filtering so it is interesting that this is happening.
as there has been no update im closing this one out.