mampfes / hacs_waste_collection_schedule

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

[Bug]: sensor show unknown after home assistant update 2024.2.5 #1847

Closed whoamihe closed 6 months ago

whoamihe commented 6 months ago

I Have A Problem With:

The integration in general

What's Your Problem

all sensors worked before the core update 2024.2.5, after that all sensors show unknown state Here one example of my configuration.yaml

waste_collection_schedule:
  sources:
    - name: ics
      args:
        file: "www/AbfallkalenderGelb.ics"
      customize:
        - type: Gelb
          alias: GelberTonne
          icon: mdi:recycle
      calendar_title: Muell_Gelb

and the configuration in sensor.yaml

  - platform: waste_collection_schedule
    source_index: 0
    name: Gelber Sack
    details_format: "upcoming"
    value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
    types:
      - GelberTonne

Source (if relevant)

No response

Logs

No response

Relevant Configuration

No response

Checklist Source Error

Checklist Sensor Error

Required

hergie1976 commented 6 months ago

Bug has already been reported twice

Bug: Leap Year Issue

whoamihe commented 6 months ago

Bug has already been reported twice

oops.. because the failure occurs after the update today, so I think the bug due to this update. Thank you for your explaintion!!

5ila5 commented 6 months ago

Leap year error fixed in #1855. But should work normally today.

ICS helper calculated an end date by replacing the year with year +1 in the current date, which throws an error as the 2025-02-29 does not exist.