mampfes / hacs_waste_collection_schedule

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

Sensor for static source not working #313

Closed Lampone closed 2 years ago

Lampone commented 2 years ago

I upgrade my installation to master and tried to add a static source, but the sensor for the static source only shows unknown as the current state. The calendar is showing the dates correctly.

Do I have to do anything special with the sensor?

waste_collection_schedule:
  sources:
   # removed other sources
    - name: static
      args:
        type: Papier
        frequency: WEEKLY
        interval: 4
        start: '2022-01-12'
        until: '2022-12-31'
sensor:
  # removed other sensors
  - platform: waste_collection_schedule
    name: muell_papier
    details_format: "upcoming"
    value_template:  '{{ value.daysTo }}'
    types:
      - Papier
Lampone commented 2 years ago

Took me hours to figure this. The static source was working fine.

If you have multiple sources, you have to define a source_index attribute in the sensor: https://github.com/mampfes/hacs_waste_collection_schedule/issues/149