hacs_waste_collection_schedule icon indicating copy to clipboard operation
hacs_waste_collection_schedule copied to clipboard

[Bug]: No time&date anymore

Open Surfer2010 opened this issue 11 months ago • 15 comments

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

  • [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  • [X] Checked that the website of your service provider is still working
  • [X] Tested my attributes on the service provider website (if possible)
  • [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)

Checklist Sensor Error

  • [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)

Required

  • [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  • [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.

Surfer2010 avatar Mar 20 '24 12:03 Surfer2010

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

5ila5 avatar Mar 22 '24 17:03 5ila5

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.

Surfer2010 avatar Mar 23 '24 13:03 Surfer2010

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)

5ila5 avatar Mar 24 '24 14:03 5ila5

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.

albundy0815 avatar Mar 26 '24 19:03 albundy0815

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

5ila5 avatar Mar 27 '24 10:03 5ila5

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.

albundy0815 avatar Mar 27 '24 11:03 albundy0815

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)

5ila5 avatar Mar 27 '24 11:03 5ila5

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!

albundy0815 avatar Mar 27 '24 15:03 albundy0815

@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

HHoppenstock avatar Mar 28 '24 08:03 HHoppenstock

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?

5ila5 avatar Mar 28 '24 10:03 5ila5

@5ila5 i have only one active calendar: image No entries in my log: image

HHoppenstock avatar Mar 28 '24 11:03 HHoppenstock

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)

5ila5 avatar Mar 28 '24 11:03 5ila5

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

HHoppenstock avatar Mar 28 '24 14:03 HHoppenstock

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?)

5ila5 avatar Mar 28 '24 17:03 5ila5

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

HHoppenstock avatar Mar 28 '24 20:03 HHoppenstock