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.
275 stars 24 forks source link

calendar_days_back set to 0 showing events in the past #75

Closed kaizersoje closed 3 years ago

kaizersoje commented 3 years ago

I have set the calendar_days_backparameter to 0. However, the card displays events in past days.

Card version: 0.6.2 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
calendar_days_back: 0
compact_mode: true

Screenshot below

image

gadgetchnnel commented 3 years ago

What is the end time of the event? I can't reproduce this, except for events which cross over from one day to the next (e.g. 10PM yesterday to 10AM today) which would be expected as the event was still active today.

kaizersoje commented 3 years ago

The event was from 2.30pm to 3.30 pm yesterday, so it did not cross into the current day .

kaizersoje commented 3 years ago

Closed it by mistake

gadgetchnnel commented 3 years ago

If you're not already on the latest version (0.6.2) can you please update to that (that version has logging of the version number to the browser console to make it easier to tell what version you're on) and give it another try?

If you still have the same issue, can you please let me know what time zone you're on? The calendar event queries are done based on UTC and there may be an issue with how the time zone conversion is being applied.

kaizersoje commented 3 years ago

I am on version 0.6.2. I mentioned the version above. My timezone is AEST ( UTC +10).

gadgetchnnel commented 3 years ago

I found a potential issue with how the times were converted to UTC to be passed to the APIs. The time was converted to UTC before applying calendar_days_back, which could cause issues depending on the timezone.

I have just release a new beta version, 0.6.3b1, where the time is only converted to UTC after calendar_days_back has been applied.

Can you please update to that version and let me know if it fixes it for you?

kaizersoje commented 3 years ago

Yes, it is fixed in v0.6.3b1. Thanks for the fix.