gadgetchnnel / lovelace-home-feed-card

A custom Lovelace card for displaying a combination of persistent notifications, calendar events, and entities in the style of a feed.
266 stars 23 forks source link

calendar_days_forward set to 0 showing events in the future #73

Closed kaizersoje closed 3 years ago

kaizersoje commented 3 years ago

I have set the calendar_days_forward parameter to 0. However, the card displays events in future days.

Card version: 0.6.0 HA version: 2021.6.5

type: custom:home-feed-card
title: Calendar Feed
card_id: cal_feed
id_filter: ^home_feed_.*
calendars:
  - calendar.gmail_cal
  - calendar.home_calendar
  - calendar.facebook_events
calendar_days_forward: 0
compact_mode: true

Screenshot below image

gadgetchnnel commented 3 years ago

Is this still showing the same? The card caches the data to avoid flooding the Home Assistant server with API requests and, for calendar events, it will only refresh the cache every 15 minutes.

kaizersoje commented 3 years ago

Yes, it is still the same.

gadgetchnnel commented 3 years ago

I found the cause of the issue, the code which sets default values for calendar_days_back and calendar_days_forward if they are not supplied was also doing this if they have a value of zero. Since the default value for calendar_days_forward is 1, this was overriding what you had set.

This should be fixed in the latest beta version, 0.6.1b2, can you please give that a try and let me know if it fixes it for you?

gadgetchnnel commented 3 years ago

This fix is now in the latest release version, 0.6.1