Abfallkalender in Home Assistent

Hello, my name is Volker. i come from Germany and i use a translator program, i hope that the program translates my text understandable.
I would like to add the waste calendar in my homeassitent, I followed a tutorial in this video.
The eintagen of the parameters in the file editor has worked so far, then the author of the video talked about that he outsources sensors in another yaml file, from then on the errors started with me, actually I have the Prejekt yesterday already abandoned, but I am very energetic, above all I know that runs and I would like to get it to run, unfortunately I have no idea of programming, so I would be grateful if you take me as an absolute beginner and I would be happy if I could complete the project with your help.

I entered the following lines with the file editor into the configuration.yaml,

waste_collection_schedule:
sources:
- name: Abfallkalender
args:
file: “Abfallkalender.ics”
customize:
- type: Graue Tonne
alias: rest
icon: mdi:trash-can
- type: Braune Tonne
alias: bio
icon: mdi:trash-can
- type: Gelbe Tonne
alias: gelb
icon: mdi:trash-can
- type: Blaue Tonne
alias: papier
icon: mdi:trash-can
fetch_time: “04:00”
day_switch_time: “10:00”

then came the point with the sensors, can’t I just write the parameters under the previous parameters ??
I tried, but when checking the configuration came an error message

The parameters of the sensors looks like this
sensor:

  • platform: waste_collection_schedule
    name: AbfallGraueTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:

    • rest
  • platform: waste_collection_schedule
    name: AbfallBrauneTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:

    • bio
  • platform: waste_collection_schedule
    name: AbfallGelbeTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:

    • gelb
  • platform: waste_collection_schedule
    name: AbfallBlaueTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:

    • papier

I would like to thank you in advance for your help

Hi…
Can you tell us, what exactly the error message is? Otherwise it would be a bit difficult to answer :slight_smile:
Not meant mean, but could you wrap the code in code tags? It would be easier to read, like so:

sensor:
  - platform: waste_collection_schedule
    name: AbfallGraueTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:
      - rest
  - platform: waste_collection_schedule
    name: AbfallBrauneTonne
    details_format: “upcomming”
    value_template: ‘{{ value.daysTo}}’
    types:
      - bio

And if noone can answer here, try this thread.

Ok, sorry. If I write all the parameters one below the other that it then looks like this, this message comes up when checking the configuration

waste_collection_schedule:
  sources:
    - name: Abfallkalender
      args:
        file: "Abfallkalender.ics"
      customize:
        - type: Graue Tonne
          alias: rest
          icon: mdi:trash-can
        - type: Braune Tonne
          alias: bio
          icon: mdi:trash-can
        - type: Gelbe Tonne
          alias: gelb
          icon: mdi:trash-can
        - type: Blaue Tonne
          alias: papier
          icon: mdi:trash-can
  fetch_time: "04:00"
  day_switch_time: "10:00"
  
  sensor:
  - platform: waste_collection_schedule
    name: AbfallGraueTonne
    details_format: "upcomming"
    value_template: '{{ value.daysTo}}'
    types:
     - rest
    
  - platform: waste_collection_schedule
    name: AbfallBrauneTonne
    details_format: "upcomming"
    value_template: '{{ value.daysTo}}'
    types:
      - bio
      
  - platform: waste_collection_schedule
    name: AbfallGelbeTonne
    details_format: "upcomming"
    value_template: '{{ value.daysTo}}'
    types:
      - gelb
      
  - platform: waste_collection_schedule
    name: AbfallBlaueTonne
    details_format: "upcomming"
    value_template: '{{ value.daysTo}}'
    types:
      - papier

Typo ?

image

What does that mean ?

it needs to be :

details_format: “upcoming”

In the video tutorial the author also talked about separating the Configuration.yaml
He created an extra yaml file for the sensors, I did that too, and titled sensor.yaml and put in the configuration for the sensors

in the Configuration.yaml should be the entry
sensor: !include sensor.yaml
should be written

In the video tutorial the author also talked about separating the Configuration.yaml
He created an extra yaml file for the sensors, I did that too, and titled sensor.yaml and put in the configuration for the sensors

in the Configuration.yaml should be the entry
sensor: !include sensor.yaml
should be written

I have also done, but then comes this error message when checking the configuration

Invalid config for [sensor]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 46).
and line 46 of configuration.yaml is empty

Post both your configuration.yaml and sensor.yaml. Format them correct according to point 11:

Maybe also a like to that video tutorial might be helpful :slight_smile:
When using a separate file, like sensor.yaml, then there is no line like sensor:
configuration.yaml:

sensor: !include sensors.yaml

and sensors.yaml:

- platform: waste_collection_schedule
  name: AbfallBrauneTonne
  details_format: "upcomming"
  value_template: '{{ value.daysTo}}'
  types:
    - bio

it is still written wrong. Change upcomming to upcoming !!!

- platform: waste_collection_schedule
  name: AbfallBrauneTonne
  details_format: "upcoming"
  value_template: '{{ value.daysTo}}'
  types:
    - bio

Yeah, sorry, just copy&paste :frowning:
Ofcourse it’s “upcoming”. I just wanted to clarify that the word “sensor:” has to be ommited when splitting the config like that.

Here is the link to the video tutorial

Hi guys, I tried for a long time yesterday and tried again and again, nis I finally almost made it, but unfortunately the waste calendar does not show the remaining days until the corresponding garbage will be collected.
Previously also noticed during the setup of the sensors that no state is displayed with the sensors. In the video tutorial is also something that apparently there can be problems with the ics file, you should import them into a calendar and then export again, I have done everything. Is there no other way, for example, the Apple calendar, or a Abodoment of a calendar, which is always updated to embed?

Here is my configuration, with which it runs well except for the small error

waste_collection_schedule:
  sources:
    - name: ics
      args:
        file: "/www/abfall.ics"
      customize:
        - type: Graue Tonne
          alias: rest
          icon: mdi:trash-can
        - type: Braune Tonne
          alias: bio
          icon: mdi:trash-can
        - type: Gelbe Tonne
          alias: gelb
          icon: mdi:recycle
        - type: Blaue Tonne
          alias: papier
          icon: mdi:trash-can
  fetch_time: "04:00"
  day_switch_time: "10:00"

sensor:
  - platform: waste_collection_schedule
    name: Abfallgrauetonne
    details_format: "upcoming"
    value_template: '{{ value.daysTo}}'
    add_days_to: false
    types:
      - rest
      
  - platform: waste_collection_schedule
    name: Abfallbiomuell
    details_format: "upcoming"
    value_template: '{{ value.daysTo}}'
    types:
      - bio      
      
  - platform: waste_collection_schedule
    name: Abfallgelbetonne
    details_format: "upcoming"
    value_template: '{{ value.daysTo}}'
    types:
      - gelb  
      
  - platform: waste_collection_schedule
    name: Abfallpapiermuell
    details_format: "upcoming"
    value_template: '{{ value.daysTo}}'
    types:
      - papier

Try changing “add_days_to” to true instead of false, and probably add it on all sensors…
That’s what mine look like:

- platform: waste_collection_schedule
  name: abfall.papier
  details_format: "upcoming"
  value_template: '{{value.daysTo}}'
  date_template: '{{value.date.strftime("%d.%m.%Y")}}'
  add_days_to: True
  count: 2
  types:
    - "PapiermĂźll"
- platform: waste_collection_schedule
  name: abfall.gelbersack
  details_format: "upcoming"
  value_template: '{{value.daysTo}}'
  date_template: '{{value.date.strftime("%d.%m.%Y")}}'
  add_days_to: True
  count: 2
  types:
    - "Gelber Sack"

Report back if that changes anything.

This is how mine looks, maybe this helps.

homeassistant:
  customize:
    sensor.waste_collection_waste:
      friendly_name: RestmĂźll
      icon: 'mdi:trash-can'
      
sensor:
  - platform: waste_collection_schedule
    name: waste_collection_waste
    details_format: upcoming
    value_template:  >-
      {% if value.daysTo == 0 %}
      HEUTE
      {% elif value.daysTo == 1 %}
      MORGEN
      {% else %}
      in {{value.daysTo}} Tagen
      {% endif %}
    types:
      - Restmuelltonne

I still got help from another side, runs meanwhile without problems, thank you anyway

And the solution was? :slight_smile:

That were so many points, I have turned to the creator of the garbage calendar, or in the Discord, it’s like a chat, I could give him access to my screen, we then went through point by point, until it was in the end still at a wrongly set / lay

1 Like