Configuration.yaml spacing issue waste collection - beginner question

What is wrong with the spacing?

Can someone guide me what I need to change?

#Abfallkalender
waste_collection_schedule:
  sources:
    - name: ics
      args:
      file: "www/abfallkalender.ics"
      calendar_title: Abfallkalender
      fetch_time: "04:00"
      day_switch_time: "12:00"

Paste your code formated, not as a picture. See point 11 here: How to help us help you - or How to ask a good question

Sorry I was unable to find the option to do that.
Can you advice?

waste_collection_schedule:
  sources:
    - name: ics
      args:
      file: "www/abfallkalender.ics"
      calendar_title: Abfallkalender
  fetch_time: "04:00"
  day_switch_time: "12:00"

sensor:
  # ------- Garbage Collection -------

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Thank you - I fixed it in my previous reply.

Also, if you are using a custom integration, (from HACS), please mention which one. Better than having your readers guessing.

If we’re talking about

See the documented example yaml configuration, and see the differences in alignments for args:

waste_collection_schedule:
  sources:
    - name: SOURCE
      args:
        arg1: ARG1
        arg2: ARG2
        arg3: ARG3
      customize:
        - type: TYPE
          alias: ALIAS
          show: SHOW
          icon: ICON
          picture: PICTURE
          use_dedicated_calendar: USE_DEDICATED_CALENDAR
          dedicated_calendar_title: DEDICATED_CALENDAR_TITLE
      day_offset: DAY_OFFSET
      calendar_title: CALENDAR_TITLE
  fetch_time: FETCH_TIME
  random_fetch_time_offset: RANDOM_FETCH_TIME_OFFSET
  day_switch_time: DAY_SWITCH_TIME
  separator: SEPARATOR
1 Like

I got it fixed - thank you!

Only thing is that I still get an error in the file editor telling:
image

waste_collection_schedule:
  sources:
    - name: ics
      args:
        file: "www/abfallkalender.ics"
      calendar_title: Abfallkalender
  fetch_time: "04:00"
  day_switch_time: "12:00"

sensor:
  # ------- Garbage Collection ------- 
  # next collection
  - platform: waste_collection_schedule
    name: "Nächste Abholung"
    value_template: '{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
  # Nächste Restmüll-Abholung
  - platform: waste_collection_schedule
    name: "RestmĂĽll"
    value_template: '{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Abfuhr Restabfall
  # Nächste Biomüll Abholung
  - platform: waste_collection_schedule
    name: "BiomĂĽll"
    value_template: '{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Abfuhr BioabfallAbfuhr Bioabfall
  # Nächste gelber-Sack Abholung
  - platform: waste_collection_schedule
    name: "Gelber Sack"
    value_template: '{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Abfuhr Leichtverpackungen
  # Nächste Papiermüll Abholung
  - platform: waste_collection_schedule
    name: "Papier"
    value_template: '{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Abfuhr Papier

You probably have another sensor: section elsewhere in your config: you should only have one. Put all of your waste-collection-schedule sensors under the first sensor: heading.

I thought about this as well and indeed I have another one for a different integration.
Sorry but this is maybe stupid question but can I put all sensors doesn’t matter from which integration they come under one sensor: without messing up the configuration.yaml?

Not only you can, but you must

1 Like