question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Types with multiple words are not working

See original GitHub issue

Home Assistant Version: core-2021.12.10

waste_collection_schedule:
  sources:
    - name: ics
      args:
        url: "https://www.mycity.de/waste.ics"
        split_at: '/'
      customize:
        - type: Bio
          alias: bio
          icon: mdi:trash-can
        - type: Rest
          alias: rest
          icon: mdi:trash-can
        - type: gelbe Tonne
          alias: gelb
          icon: mdi:trash-can
        - type: blaue Tonne
          alias: altpapier
          icon: mdi:trash-can
        - type: Grün
          alias: gruen
          icon: mdi:trash-can

It’s interesting that rest, bioand gruen are working perfectly fine. gelband altpapier are not working. The sensors’ values are unknown. So I am pretty sure that it has something to with the format of the type. gelbe Tonne and blaue Tonnehas a whitespace, all working types have not.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mampfescommented, Mar 7, 2022

I found the issue: The ICS source “normalizes” all waste types to title case if the split_at option is set. This is necessary because there are service providers which use different case styles for the same waste type depending on the position within the joined waste type string. If you use the following config it should work:

waste_collection_schedule:
  sources:
    - name: ics
      args:
        url: "https://www.bergheim.de/html/ics/Bergheim-2022.ics"
        split_at: "/"
      customize:
        - type: Bio
          alias: bio
          icon: mdi:trash-can
        - type: Rest
          alias: rest
          icon: mdi:trash-can
        - type: Gelbe Tonne
          alias: gelb
          icon: mdi:trash-can
        - type: Blaue Tonne
          alias: altpapier
          icon: mdi:trash-can
        - type: Grün
          alias: gruen
          icon: mdi:trash-can

1reaction
mampfescommented, Mar 6, 2022

I checked your example. It is working on my machine.

I assume that your service provider is not sending a standard space character but something different (there are a lot of spaces in Unicode). To verify this, you can add a sensor without a types filter. If I’m right, then this sensor should show also the entries with the space character. You then you have to adjust the type field in the customize section.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Ways to Fix a Keyboard That Types Multiple Letters in ...
If your keyboard keeps typing multiple letters at once on Windows 10, there may be several reasons behind why it's doing this.
Read more >
7 Best Ways to Fix Keyboard Typing Multiple Letters in ...
Here's how you can fix your keyboard from typing multiple letters in Windows ... Windows offers a native troubleshooter to fix issues with ......
Read more >
How to select items that are not next to each other
By using the mouse and the keyboard, you can select text and graphics, including items that are not next to each other (non-contiguous)...
Read more >
Defining array with multiple types in TypeScript - Stack Overflow
Defining array with multiple types in TypeScript. Use a union type (string|number)[] demo: const foo: (string|number)[] = [ 1, "message" ];.
Read more >
Full-text-search not working when the query is multiple strings
My workaround is to replace whitespace with underscore , it works for tabs, newline, and consecutive white spaces. { search:query.replace ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found