Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: no entities available - State unknown #3174

Open
7 tasks done
DanielStockinger opened this issue Dec 9, 2024 · 15 comments
Open
7 tasks done

[Bug]: no entities available - State unknown #3174

DanielStockinger opened this issue Dec 9, 2024 · 15 comments

Comments

@DanielStockinger
Copy link

DanielStockinger commented Dec 9, 2024

I Have A Problem With:

Sensor configuration

What's Your Problem

if no entities are available, because end of year, (source entities are only for one year)

configuration:

sources:
  - name: data_umweltprofis_at
    args:
      xmlurl: https://data.umweltprofis.at/opendata/AppointmentService/AppointmentService.asmx/GetTermineForLocationSecured?Key=TEMPKeyabvvMKVCic0cMcmsTEMPKey&StreetNr=102161&HouseNr=Alle&intervall=Alle
      #url: webcal://roedermark.mein-abfallkalender.online/ical.ics?sid=20350&cd=inline&ft=6&fu=webcal_other&fp=next_30&wids=547,546,639,545&uid=12111&pwid=daf5b44452&cid=83
    customize:
      - type: Restabfall
        alias: restabfall
        icon: mdi:trash-can
        picture: local/waste/restabfall.webp
      - type: Gelbe Säcke
        alias: gelbersack
        icon: mdi:recycle
        picture: local/waste/gelbersack.webp
      - type: Bioabfall
        alias: bioabfall
        icon: mdi:trash-can
        picture: local/waste/bioabfall.webp
      - type: Altpapier
        alias: altpapier
        icon: mdi:recycle
        picture: local/waste/altpapier.webp
    calendar_title: Abfallkalender
fetch_time: "02:00"
day_switch_time: "23:00"

sensor configuration:

platform: waste_collection_schedule
name: "PapierNEU"
value_template: >
  {% if value is not defined or value == 'unknown' or value is none  %}
    Keine Abholung
  {% elif value.daysTo == 0 %}
    Heute
  {% elif value.daysTo == 1 %}
    Morgen
  {% else %}
    in {{ value.daysTo }} Tagen
  {% endif %}
types:
  - Papiertonne

i get status unknown
if value is not defined or value == unknown is not working
image

please add possibility to add fallback value if no entities are available.

Many Thanks

Source (if relevant)

https://data.umweltprofis.at/opendata/AppointmentService/AppointmentService.asmx/GetTermineForLocationSecured?Key=TEMPKeyabvvMKVCic0cMcmsTEMPKey&StreetNr=102161&HouseNr=Alle&intervall=Alle

Logs

No response

Relevant Configuration

No response

Checklist Source Error

  • Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  • Checked that the website of your service provider is still working
  • Tested my attributes on the service provider website (if possible)
  • 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

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

Required

  • I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  • 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.
@DanielStockinger DanielStockinger changed the title [Bug]: no entities available [Bug]: no entities available - State unknown Dec 9, 2024
@daencore
Copy link

daencore commented Dec 9, 2024

Hey, I have the same problem here. I think it's because there are no more paper waste pickup dates this year, and the schedule for next year is not yet available. That's why the status is unknown, as it doesn't find a date in the XML anymore.

@DanielStockinger
Copy link
Author

Hey @daencore

exactly.
If no value is found, there should be a option to specify a fallback value

@MikeDeltaHH
Copy link

MikeDeltaHH commented Dec 13, 2024

I have the same problem, the collection dates for 2025 (Stadtreinigung Hamburg) are already known, but the status is still unknown...

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 1, 2025

@DanielStockinger
@daencore
i have the same problem with umweltprofis.at. the data stops at beginning 2025 and weren't updated although the data (analog/paper format) is already available. what i can see on the Umweltprofis Daten Portal is following:

image

In my opinion "DEMO Data" means that the service was changed to testing purposes only
and will not be acutal anymore. which wasn't so in the past.
i almost "fear" that it was just a "public test" and they stopped it because of the
mobile app they offer. this data ressource would then become useless for "hacs-waste-collection-schedule".
I wrote a mail to the BAV for my district requesting more information about this service. lets see what they reply.

@andyboeh
Copy link
Contributor

andyboeh commented Jan 1, 2025

The "DEMO Daten" message was there ever since this source was added back in 2022. At the end of 2022, the ICS service stopped working and it was never fixed, so this source was switched to XML. I sent an E-Mail to them back in 2022 and their reply was that they have no interest and fixing the ICS API.

When I go to the website of my hometown, I can access the complete waste calendar online and, upon clicking on a waste type, ICS links are provided. As a workaround, it's probably sufficient to just copy the ICS links of each type and paste it into the integration. Data is provided until January 2026.

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 2, 2025

The "DEMO Daten" message was there ever since this source was added back in 2022. At the end of 2022, the ICS service stopped working and it was never fixed, so this source was switched to XML. I sent an E-Mail to them back in 2022 and their reply was that they have no interest and fixing the ICS API.

When I go to the website of my hometown, I can access the complete waste calendar online and, upon clicking on a waste type, ICS links are provided. As a workaround, it's probably sufficient to just copy the ICS links of each type and paste it into the integration. Data is provided until January 2026.

ok then i forgot that the "Demo Daten" message was always there
my hometown doesn't provide an ics link only the pdf for downloading. so this workaround doesn't work for me but thanks anyway. will ask them if there is a possibility to get the ics link. nevertheless for me it looks like that the xml source is also broken now since the data is not updated there

@DanielStockinger
Copy link
Author

Hello,

are there any news?

Many Thanks Daniel

@daencore
Copy link

daencore commented Jan 8, 2025

Hello,

are there any news?

Many Thanks Daniel

Hey, Currently, the API of Umweltprofis.at is not working. I was in contact with the Umweltprofis support team earlier today. They are working on resolving the issue, but there is no timeline yet for when the API will be operational again.
As a result, all of my sensors are currently in "Unknown" state.

@BombusAlpinus
Copy link

@daencore thanks. i was told to use the mobile app and that the person who is responsible for the data for my district is on vacation till 20th of january ;-) ... lets hope that they get fixed the api soon...

@andyboeh
Copy link
Contributor

andyboeh commented Jan 9, 2025

If you install the "Abfall OÖ" App, it allows you to generate an iCal Link for your address (during Setup). This link can be copied and it should work. Should, because I ran into #3509 while testing.

Edit: After applying the fix from home-assistant/core#135077, my entities are back!

My config now looks like this:

waste_collection_schedule:
  sources:
    - name: ics
      args:
         url: https://uwpio.gem2go.dev/ical/xxxxxxxxxxxxxxxxxxx
      customize:
        - type: "Restabfall (2-wöchentlich)"
          alias: Restmüll
        - type: "Gelbe Tonne (zum angegebenem Datum)"
          alias: Gelbe Tonne
        - type: "Altpapier (zum angegebenem Datum)"
          alias: Papier
        - type: "Biotonne"
          alias: Biotonne
          show: false

sensor:
  - platform: waste_collection_schedule
    name: next_collection

  - platform: waste_collection_schedule
    name: next_restmuell_collection
    types:
      - Restmüll

  - platform: waste_collection_schedule
    name: next_papier_collection
    types:
      - Papier

  - platform: waste_collection_schedule
    name: next_gelbetonne_collection
    types:
      - Gelbe Tonne

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 9, 2025

@andyboeh thanks for the info... will test it during the day... althought i didn't want to install/use the app ;)

@andyboeh
Copy link
Contributor

andyboeh commented Jan 9, 2025

Me neither, but you can delete it right afterwards.

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 9, 2025

ok, i currently tried to change the config to the ics source which i generated through the app (thanks again for hint @andyboeh) but it looks like that i stumbled over another bug:
#3488
will wait for a fix and try it again ;)

@andyboeh
Copy link
Contributor

andyboeh commented Jan 9, 2025

That's a duplicate of the one I linked.

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 9, 2025

fyi: i "implemented" the fix mentioned in this report: #135077 in my testsystem and the calendar integration and waste collection scheduler is working again. also with the ics link generated in
the "Abfall OÖ" app. but i'm by far no programmer and i do not know what impact this "fix" has. thats why i tried it only in my testsystem ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants