idaho / hassio-trash-card

TrashCard - indicates what type of trash will be picked up next based on your calendar entries 🗑️
Apache License 2.0
156 stars 19 forks source link

[Bug]: days in future bug (#274) persists #295

Open snigehere opened 7 months ago

snigehere commented 7 months ago

Requirements

Current Behavior

the issue described in https://github.com/idaho/hassio-trash-card/issues/274 persists after installing 2.2.1

trash collections for two days in the future show up when filter is set to only show one day in the future.

As described in the prior defect I have two calendars with collections coming from both. Items from one calendar (manually entered full day events) display as expected on the day before the collection date. Items from the second calendar, populated via the waste collection schedule integration, show the correct date in the card but it shows up two day prior to the collection date

Expected Behavior

bin collections scheduled for monday .. reminder should not show up until sunday (its currently saturday)

Steps To Reproduce

set card config

event_grouping: true drop_todayevents_from: '10:30:00' next_days: 1 pattern:

card shows one entry ahead of time

Context

No response

Environment

- Browser: chrome
- HA Version: 
Core 2024.4.3
Supervisor 2024.04.0
Operating System 12.2
Frontend 20240404.2
- TrashCard: 2.2.1

Debug data

see also https://github.com/idaho/hassio-trash-card/issues/274

DEBUG LOG
timezone
"+01:00"
calendar data
[
  {
    "start": {
      "date": "2024-04-15"
    },
    "end": {
      "date": "2024-04-16"
    },
    "summary": "refuse bin",
    "description": null,
    "location": null,
    "uid": null,
    "recurrence_id": null,
    "rrule": null,
    "entity": "calendar.portsmouth_city_council"
  }
]
normaliseEvents
[
  {
    "date": {
      "start": "2024-04-14T23:00:00.000Z",
      "end": "2024-04-15T23:00:00.000Z"
    },
    "isWholeDayEvent": true,
    "content": {
      "summary": "refuse bin",
      "description": null,
      "location": null,
      "uid": null,
      "recurrence_id": null,
      "rrule": null,
      "entity": "calendar.portsmouth_city_council"
    }
  }
]
dropAfter
false
now
"2024-04-13T00:15:53.493Z"
activeElements
[
  {
    "date": {
      "start": "2024-04-14T23:00:00.000Z",
      "end": "2024-04-15T23:00:00.000Z"
    },
    "isWholeDayEvent": true,
    "content": {
      "summary": "refuse bin",
      "description": null,
      "location": null,
      "uid": null,
      "recurrence_id": null,
      "rrule": null,
      "entity": "calendar.portsmouth_city_council"
    }
  }
]
eventsToItems
[
  {
    "date": {
      "start": "2024-04-14T23:00:00.000Z",
      "end": "2024-04-15T23:00:00.000Z"
    },
    "isWholeDayEvent": true,
    "content": {
      "summary": "refuse bin",
      "description": null,
      "location": null,
      "uid": null,
      "recurrence_id": null,
      "rrule": null,
      "entity": "calendar.portsmouth_city_council"
    },
    "icon": "mdi:trash-can-outline",
    "color": "black",
    "type": "waste",
    "label": "Black bin",
    "pattern": "refuse bin",
    "idx": 3
  }
]

Anything else?

I have looked at the calendar entries from the two calendars and don't see any difference however i wonder if the issue is related to timezone in filters? in the uk we are GMT +1 and so the entry shown the the debug shows the 14th at 23:00 GMT/UTC as the start ,, if the timezone is ignored then it will show the as being due tomorrow rather than the 15th......

snigehere commented 7 months ago

pictures.. calendar view Snap3

card in ha showing refuse bit Snap4

snigehere commented 1 month ago

The issue described here and in https://github.com/idaho/hassio-trash-card/issues/274 persists after installing 2.3.2

woody4165 commented 1 week ago

Hi

I'm having same issue

I have set days to 1 and today, Nov 3rd, I see the Nov 5th events