dcmeglio / homeassistant-waste_management

Determines your next Waste Management (https://www.wm.com) pickup times for use in Home Assistant.
7 stars 0 forks source link

Holiday Delay Not Accounted For #8

Open brooksben11 opened 1 year ago

brooksben11 commented 1 year ago

I have a day delay because of Memorial Day, but it isn't showing up. Logging into my WM account, it still shows my normal pickup day but has a secondary info header of 'Holiday Schedule' that only lists Memorial Day and says it will be delayed by a day as a result. Not sure if this can be picked up somehow in the API, but I see this as primary use of this integration (dynamically adjusting for delays).

dcmeglio commented 1 year ago

Could you share the exact text of the Memorial Day message? That’s what the api returns so I have to parse that text.

brooksben11 commented 1 year ago

MEMORIAL DAY

5/29/2023

Due to the Memorial Day holiday, service scheduled between Monday, May 29th and Friday June 2nd will be delayed by one day.

Screenshot_20230527-074533.png

brooksben11 commented 1 year ago

Let me know if you need any other info; more than happy to help!

jasonsf commented 1 year ago

Same situation here 20230528_163551.jpg

robweber commented 1 year ago

I too am affected by this and did some digging on the parsing text within the waste management Python module. I noticed a few things that might be helpful (wanted to try this while the holiday message was still active).

  1. The get holiday delay date function expects to find a date within the pickupDayInfo payload. For whatever reason the date field was NULL as returned by the waste management API. I captured the full response below. To get around this I hardcoded 5-29-2023 to see if I could get past this.
    {"date": null, "message": "REFER TO HOLIDAY SCHEDULE", "messageDesc": "Your regular scheduled pickup may be affected due to a holiday. Please check your holiday schedule for any changes regarding your pickup."}
  2. The next problem occurred when trying to extract the updated date using the parse impacted holiday date function. It expects to find the next date within the message, but again waste management is not consistent and instead gave a very unhelpful message. Below is the returned message:
    Due to the Memorial Day holiday, service scheduled between Monday, May 29th and Friday June 2nd will be delayed by one day.

Between the two of these it's just not capturing this holiday and finding the next service date. Not sure any of this will help solve the problem but it at least pin points where the issue is happening. It would be nice if the "next service date" just returned the actual next service date and didn't require all the weird parsing and checking of the messages.

TZombiEd commented 1 year ago

I've had a problem figuring out the holiday delay manually ever since I've been a WM customer. Most of the time I have relied on a robocall from WM to notify me of a day's delay since not all holidays impact the schedule. This Memorial Day I didn't get a robocall so I checked their website "Next Pickup" still showed my next pickup at the normal day and time. However, I did see the same delay message under "Holiday Schedule" that robweb shows above. The problem is over the years the text shown in "Holiday Schedule" has not been consistent other that to say "... will be delayed by one day".

brooksben11 commented 1 year ago

Any updates? Haven't seen any integration updates and (as expected) the delay associated with Independence Day isn't being handled. I get it's tricky due to how WM's API handles things, but unless this can get handled this isn't really useful as an integration for me since my service is always the same day (outside of holidays).

dcmeglio commented 1 year ago

You’re welcome to submit a PR if you have a fix. I probably won’t have time to look into this any time soon.

rsissons commented 1 year ago

I just ran into this problem for Labor Day, which was yesterday. next pickup day in the integration said today, but the additional' "See holiday schedule" message on their site says it's delayed by one day. Seems they aren't updating the Next Pickup Day or providing an Offset if the Next Pickup Day is delayed.

robweber commented 1 year ago

I really think this is a case of WM just not using their own software correctly. Even logging in to my WM account the pickup day doesn't change. It's like they add a note to the account but don't actually set the holiday.

pyrometheous commented 6 months ago

Did this ever get sorted? The holiday calendar is the reason why I added this to HA. I haven't had a holiday yet though, so I don't know if that works or not.