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 22 forks source link

All-day event displayed as "today" #37

Closed sgofferj closed 4 years ago

sgofferj commented 4 years ago

I have an all-day event in 3 days (today is 2020-03-15, event is on 2020-03-18). The card shows it as "today" but when clicking for more info, it shows the correct date. The problem does not occur with another event which has a time frame set. Screenshot_20200315_185554

gadgetchnnel commented 4 years ago

Are you using the Google calendar integration? I did find that some calendar integrations (I've never seen this with Google) don't differentiate between dates and datetimes for the start and end of an event, which the card normally uses to determine if an event is all-day and this causes the card to fall back to detecting these based on their duration. It looks like this can potentially cause the issue you are seeing.

gadgetchnnel commented 4 years ago

@sgofferj I have just released a new beta version, 0.4.1b2, which has a potential fix for this. It's hard to tell if this will actually fix it, as none of my calendars have this issue, so can you please try it and let me know how it works for you?

sgofferj commented 4 years ago

@gadgetchnnel I'm using the caldav integration. Is the beta by any chance installable via HACS? If you need a caldav account for playing around - I have a private Nextcloud server which is reachable from the internet. Creating an account for you would be no problem.

gadgetchnnel commented 4 years ago

Yes, as long as you have the "Show beta" option turned on for the plugin (under the 3 dots menu) you should be able to install it via HACS.

sgofferj commented 4 years ago

Installed b3 now. Created all day event on 25.03. and it shows as "tomorrow" (today is 22.03). Better than "today" but still not correct.

gadgetchnnel commented 4 years ago

Can you please try with the latest beta 0.4.1b4 which should have improved handling for all-day events (include multi-day events which weren't being handled well). Edit: Found a bug in 0.4.1b4, which is fixed in 0.4.1b5

sgofferj commented 4 years ago

That looks better! My all-day testevent on Friday is now shown as "Friday". However, a birthday next week Monday is shown as "Monday" while a timed event next Sunday is shown as "in 5 days". Is that intended?

gadgetchnnel commented 4 years ago

Currently that's intended, as all-day events use Moment calendar formatting while other events use the standard "relative" format from Home Assistant. I'll see if I can add an option to have these (and possibly entities) use the same format (so the timed event would be something like "next Sunday at time")

gadgetchnnel commented 4 years ago

Closing this as solved no, although more daate/time formatting options may be added to improve this at some pojnt..