pippyn / Home-Assistant-Sensor-Afvalbeheer

Provides Home Assistant sensors for multiple Dutch and Belgium waste collectors
Apache License 2.0
272 stars 85 forks source link

PMD changed to capitals? #470

Closed Arbotje closed 6 months ago

Arbotje commented 6 months ago

I ran into an issue, displaying the icon for pmd on my dashboard. After updating to version 5.3.1, the custom icon I use in my config didn't load anymore. I had to change the key value from pmd to PMD, in capitals.

I use gad as waste collector.

pippyn commented 6 months ago

Yes update 5.3.1 fixes the capitalization of the fractions. But it shouldn't affect the unique IDs. How are you assigning the icon?

Arbotje commented 6 months ago

I have the code below in my card definitions. It worked using lowercase only before version 5.3.1. To get it working again I added an extra line with PMD.

  - type: picture-entity
    entity: sensor.gad_morgen
    name: Morgen
    state_image:
      gft: local/afvalwijzer/gad/gft.svg
      papier: local/afvalwijzer/gad/papier.svg
      restafval: local/afvalwijzer/gad/kliko-grijs-rest.svg
      pmd: local/afvalwijzer/gad/pmd.svg
      PMD: local/afvalwijzer/gad/pmd.svg
      Geen: local/afvalwijzer/gad/kliko-wit.svg

Fortunately, there is a workaround. It took me a while to find out what has changed.

pippyn commented 6 months ago

Ahh yes this will affect gft also, it will become GFT. So your config will change to this:

 - type: picture-entity
    entity: sensor.gad_morgen
    name: Morgen
    state_image:
      GFT: local/afvalwijzer/gad/gft.svg
      Papier: local/afvalwijzer/gad/papier.svg
      Restafval: local/afvalwijzer/gad/kliko-grijs-rest.svg
      PMD: local/afvalwijzer/gad/pmd.svg
      Geen: local/afvalwijzer/gad/kliko-wit.svg
Arbotje commented 6 months ago

Thanks for your answers. Will change GFT also.