mampfes / hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules
MIT License
988 stars 631 forks source link

[Bug]: fetch failed for Republic Services #2420

Closed mmstano closed 1 month ago

mmstano commented 1 month ago

I Have A Problem With:

A specific source

What's Your Problem

I’ve been using this integration since the yaml-only days and have never experienced an issue until yesterday when the integration stopped working for me. No information is being pulled from Republic to update my sensors. I’ve tried uninstalling/reinstalling to no avail. I’ve tried updating my value templates for the sensors. I’ve also tried migrating from yaml config to the GUI config and receive the same error. This problem leads me to think the issue happened because of something Republic may have changed on their end.

I’ve tried updating to the master branch but the version selector keeps reverting to the latest stable (I’m assuming this is an issue of HACS unrelated to WCS, as I’m experiencing this with all of my HACS custom components)

Source (if relevant)

Republic Services

Logs

Logger: waste_collection_schedule.source_shell
Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:147
integration: Waste Collection Schedule (documentation)
First occurred: 8:38:44 AM (1 occurrences)
Last logged: 8:38:44 AM

fetch failed for source Republic Services: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 145, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/republicservices_com.py", line 106, in fetch dt = datetime.strptime( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 554, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 333, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2024-01-01T00:00:00.000Z' does not match format '%Y-%m-%dT00:00:00.0000000Z'

Relevant Configuration

waste_collection_schedule:
  sources:
    - name: republicservices_com
      args: 
        street_address: “ADDRESS”
        method: 1

sensor:
 - platform: waste_collection_schedule
    name: recycle_date
    types:
      - Recycle
    value_template: '{{value.date.strftime("%m/%d/%Y")}}'

Checklist Source Error

Checklist Sensor Error

Required

mmstano commented 1 month ago

I managed to force an update to master using the update service call, but still get the fetch error.

5ila5 commented 1 month ago

Fixed in #2422

This will be part of the next release or is available now as master (git) version (3-dot menu -> redownload -> change version to master -> fully restart HA (this will increase update cycle by a lot)