mampfes / hacs_waste_collection_schedule

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

[Bug]: No time&date anymore #1901

Open Surfer2010 opened 3 months ago

Surfer2010 commented 3 months ago

I Have A Problem With:

Sensor configuration

What's Your Problem

My sensors don't show any date for the next collection anymore: grafik

it worked before as you can see here: grafik

this also works: grafik

this does not: grafik grafik

there should be results: grafik grafik

thanks for helping

Source (if relevant)

No response

Logs

No response

Relevant Configuration

No response

Checklist Source Error

Checklist Sensor Error

Required

5ila5 commented 3 months ago

Not sure, looks fine on first sight. Are there any entries in your logs?

Surfer2010 commented 3 months ago

Not sure, looks fine on first sight. Are there any entries in your logs?

no entries in my log, that's my problem, I have no idea whatsoever what the problem could be since it did work for some days.

5ila5 commented 3 months ago

Could you please send your whole (source + sensor) configuration (as text not as image) (maybe replace your address with the example address of the source)

albundy0815 commented 3 months ago

I noticed the same behavior. It worked well and I didn't change it on my side. The calendar is showing the data, but not the entities (partly): image

image

also no errors in the log visible.

5ila5 commented 3 months ago

This looks like misconfigured sensors (Does the types' argument match exactly the spelling of the waste type shown in the calendar?)

albundy0815 commented 3 months ago

as I'm not a scripting guy, attached you can find my config.yaml

config.txt for me, it seems, that the sensors are configured correct, because: "Gelber Sack" is working fine "Altpapier" and "Restmüll" not via entity, only via Calendar.

5ila5 commented 3 months ago

As far as I can tell from your Image of your calendar, the types parameter of Restmüll should be Grauen Tonne not Restmüll? Or am I missing something? (Probably something similar with Altpapier? Not part of your calendar Image)

albundy0815 commented 3 months ago

As far as I can tell from your Image of your calendar, the types parameter of Restmüll should be Grauen Tonne not Restmüll? Or am I missing something? (Probably something similar with Altpapier? Not part of your calendar Image)

you point me, into the right direction ;-)

image image

Thanks a lot for support!

HHoppenstock commented 3 months ago

@5ila5 I have the same issues but no clue how to solve it. Can you please take a look on it ? That's the entry in the calendar:

image

This is the config for the waste sensor:

  # Nächste Restmüll-Abholung
  - platform: waste_collection_schedule
    name: "Restmüll"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Restmüll

that's the result:

image

the calendar sensor shows the right entry for the next "Restmüll":

image
5ila5 commented 3 months ago

Most occuring problem (probably not @HHoppenstock problem): You defined types: - Restmüll which means this sensor will only look into events taht are named Restmüll. Check your calendar if the Restmüll events are actually named Restmüll (written exactly the same)

@HHoppenstock:

Do you use multiple waste_collection_shedule calendars? You then need to use the source_index parameter.

Did you look in your logs?

HHoppenstock commented 3 months ago

@5ila5 i have only one active calendar:

image

No entries in my log:

image
5ila5 commented 3 months ago

looks fine on first sight. Could you please send your full configuration source + sensor So I can have a look in my own HA instace later? (best to replace your address with an example address from the README.md)

HHoppenstock commented 3 months ago

config_waste_management.txt @5ila5 please see my attached config. Thanks a lot.

5ila5 commented 3 months ago

I'm not quite sure what's should be wrong with your configuration. I needed to adjust the types argument to match the returned waste types of the example address, but this works fine for me (except : Baum- und Strauchschnitt as it's not offered in this Region):

waste_collection_schedule:
  sources:
    - name: muellabfuhr_de
      args:
        client: "Landkreis Hildburghausen"
        city: "Gompertshausen"

sensor:
  # ------- Garbage Collection ------- 
  # next collection
  - platform: waste_collection_schedule
    name: "Nächste Abholung"
    value_template: '{{value.types|join(", ")}}{% 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: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Restabfall

  # Nächste Biomüll Abholung
  - platform: waste_collection_schedule
    name: "Biotonne"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Biomüll
  # Nächste gelber-Sack Abholung
  - platform: waste_collection_schedule
    name: "Gelbe Tonne"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - gelbe Tonne/Leichtverpackungen
  # Nächste Papiermüll Abholung
  - platform: waste_collection_schedule
    name: "Papier"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Papier
  # Nächste Papiermüll Abholung
  - platform: waste_collection_schedule
    name: "Container für Baum- und Strauchschnitt"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Container für Baum- und Strauchschnitt
  # Nächste Papiermüll Abholung
  - platform: waste_collection_schedule
    name: "Schadstoffmobil"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Schadstoffmobil

Please try to run exactly this config and check whether you can now see your sensors. If errors still persist, try reinstalling this integration. Maybe there is a weird space in the returned waste type? Double check every waste type is spelled exactly the same as shown in the calendar (copy paste?)

HHoppenstock commented 3 months ago

@5ila5 thanks a lot. have a great weekend and happy easter