Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Wrong "days to" value for multiday entries #327

Open
2 tasks done
sanvalerius opened this issue Jun 9, 2024 · 0 comments
Open
2 tasks done

[Bug]: Wrong "days to" value for multiday entries #327

sanvalerius opened this issue Jun 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sanvalerius
Copy link

sanvalerius commented Jun 9, 2024

Requirements

  • I checked the troubleshooting section in the README to verify that I have the latest TrashCard version.
  • I did a search to see if there is a similar issue or if a pull request is open.

Current Behavior

The "in xx days" doesn't show the right value if the event hasn't finished.

I have a calendar with a "parental care" planning like this:
2024-06-10 00_02_03-Google Agenda - juin 2024

Note that in this example We are Monday June 10th

If I set the "show event time as" -> "Date", the correct values are displayed, even if the date is in the past
2024-06-10 00_08_52-Bubble – Home Assistant

If I set the "show event time as" -> "days to", the value for the item that started but not yet ended is incorrect:
2024-06-10 00_09_35-Bubble – Home Assistant

Expected Behavior

On this example, the "Chez Coline" should be either a negative value (like "5 days ago"), or showing the next event ("in 9 days")

Steps To Reproduce

Create a multi-day Calendar entry that started in the past of the current date and stop few days after.

Context

YAML state

Environment

- Browser: Chrome
- HA Version:2024.6.1
- TrashCard: 2.2.1

Debug data

[{"message":"timezone","data":"+02:00"},{"message":"calendar data","data":[{"start":{"dateTime":"2024-06-05T18:00:00+02:00"},"end":{"dateTime":"2024-06-11T19:00:00+02:00"},"summary":"Chez Coline","description":null,"location":null,"uid":"bpq4kl4htc7r51qpd84n7q82fk@google.com","recurrence_id":"bpq4kl4htc7r51qpd84n7q82fk_20240605T160000Z","rrule":null,"entity":"calendar.planning_familia"},{"start":{"dateTime":"2024-06-11T18:00:00+02:00"},"end":{"dateTime":"2024-06-19T19:00:00+02:00"},"summary":"Chez Steph","description":null,"location":null,"uid":"819ivie7kq4p45dcnsek45n4n8@google.com","recurrence_id":"819ivie7kq4p45dcnsek45n4n8_20240611T160000Z","rrule":null,"entity":"calendar.planning_familia"},{"start":{"dateTime":"2024-06-12T10:30:00+02:00"},"end":{"dateTime":"2024-06-12T12:00:00+02:00"},"summary":"Camille: Poney","description":"Cours de Poney","location":"Poney Club de Sciez, 1322 Rte de Choisy, 74140 Sciez, France","uid":"20n4semeeup1va6n5apiokdd3h@google.com","recurrence_id":"20n4semeeup1va6n5apiokdd3h_20240612T083000Z","rrule":null,"entity":"calendar.planning_familia"},{"start":{"dateTime":"2024-06-12T14:30:00+02:00"},"end":{"dateTime":"2024-06-12T16:00:00+02:00"},"summary":"Alice: Poney","description":"Cours de Poney","location":"Poney Club de Sciez, 1322 Rte de Choisy, 74140 Sciez, France","uid":"2d2te390gookjq64gfrhvp72h2_R20240124T133000@google.com","recurrence_id":"2d2te390gookjq64gfrhvp72h2_R20240124T133000_20240612T123000Z","rrule":"FREQ=WEEKLY;UNTIL=20240828T215959Z;BYDAY=WE","entity":"calendar.planning_familia"}]},{"message":"normaliseEvents","data":[{"date":{"start":"2024-06-05T16:00:00.000Z","end":"2024-06-11T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Coline","description":null,"location":null,"uid":"bpq4kl4htc7r51qpd84n7q82fk@google.com","recurrence_id":"bpq4kl4htc7r51qpd84n7q82fk_20240605T160000Z","rrule":null,"entity":"calendar.planning_familia"}},{"date":{"start":"2024-06-11T16:00:00.000Z","end":"2024-06-19T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Steph","description":null,"location":null,"uid":"819ivie7kq4p45dcnsek45n4n8@google.com","recurrence_id":"819ivie7kq4p45dcnsek45n4n8_20240611T160000Z","rrule":null,"entity":"calendar.planning_familia"}},{"date":{"start":"2024-06-12T08:30:00.000Z","end":"2024-06-12T10:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Camille: Poney","description":"Cours de Poney","location":"Poney Club de Sciez, 1322 Rte de Choisy, 74140 Sciez, France","uid":"20n4semeeup1va6n5apiokdd3h@google.com","recurrence_id":"20n4semeeup1va6n5apiokdd3h_20240612T083000Z","rrule":null,"entity":"calendar.planning_familia"}},{"date":{"start":"2024-06-12T12:30:00.000Z","end":"2024-06-12T14:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Alice: Poney","description":"Cours de Poney","location":"Poney Club de Sciez, 1322 Rte de Choisy, 74140 Sciez, France","uid":"2d2te390gookjq64gfrhvp72h2_R20240124T133000@google.com","recurrence_id":"2d2te390gookjq64gfrhvp72h2_R20240124T133000_20240612T123000Z","rrule":"FREQ=WEEKLY;UNTIL=20240828T215959Z;BYDAY=WE","entity":"calendar.planning_familia"}}]},{"message":"dropAfter","data":false},{"message":"now","data":"2024-06-09T22:13:48.052Z"},{"message":"activeElements","data":[{"date":{"start":"2024-06-05T16:00:00.000Z","end":"2024-06-11T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Coline","description":null,"location":null,"uid":"bpq4kl4htc7r51qpd84n7q82fk@google.com","recurrence_id":"bpq4kl4htc7r51qpd84n7q82fk_20240605T160000Z","rrule":null,"entity":"calendar.planning_familia"}},{"date":{"start":"2024-06-11T16:00:00.000Z","end":"2024-06-19T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Steph","description":null,"location":null,"uid":"819ivie7kq4p45dcnsek45n4n8@google.com","recurrence_id":"819ivie7kq4p45dcnsek45n4n8_20240611T160000Z","rrule":null,"entity":"calendar.planning_familia"}}]},{"message":"eventsToItems","data":[{"date":{"start":"2024-06-05T16:00:00.000Z","end":"2024-06-11T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Coline","description":null,"location":null,"uid":"bpq4kl4htc7r51qpd84n7q82fk@google.com","recurrence_id":"bpq4kl4htc7r51qpd84n7q82fk_20240605T160000Z","rrule":null,"entity":"calendar.planning_familia"},"icon":"mdi:human-female-female-child","color":"pink","type":"paper","label":"Chez Coline","pattern":"Chez Coline","idx":1},{"date":{"start":"2024-06-11T16:00:00.000Z","end":"2024-06-19T17:00:00.000Z"},"isWholeDayEvent":false,"content":{"summary":"Chez Steph","description":null,"location":null,"uid":"819ivie7kq4p45dcnsek45n4n8@google.com","recurrence_id":"819ivie7kq4p45dcnsek45n4n8_20240611T160000Z","rrule":null,"entity":"calendar.planning_familia"},"icon":"mdi:human-male-child","color":"blue","type":"organic","label":"Chez Steph","pattern":"Chez Steph","idx":0}]}]

Anything else?

Thanks a lot for the work you've done

@sanvalerius sanvalerius added the bug Something isn't working label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant