OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
Apache License 2.0
133 stars 32 forks source link

Allow icon aliases PR has caused actual icons to use alias? Water is now Liquid-Spot #89

Closed chunkysteveo closed 6 months ago

chunkysteveo commented 6 months ago

Describe the bug Since PR80 https://github.com/jonasniesner/open_epaper_link_homeassistant/pull/80 to allow for alias in using icons - using an icon which has alias same as icon name causes issues.

To Reproduce Steps to reproduce the behavior: use icon water in an automation, and you will end up with icon "liquid-spot" icon. This has an alias of "water".

        - type: icon
          value: water
          x: 0
          "y": 0
          size: 32
          color: black

Expected behavior The icon should be water - https://pictogrammers.com/library/mdi/icon/water/ The icon ends up as liquid-spot - https://pictogrammers.com/library/mdi/icon/liquid-spot/

image

Fix Need to update the check in the commit https://github.com/jonasniesner/open_epaper_link_homeassistant/pull/80/commits/472c6a4c00b3a1b2cfe82a4f0fc4e724be021631 to check for icon, if failed, THEN check for alias?

jonasniesner commented 6 months ago

@DerFlob can you take a look at this?

chunkysteveo commented 6 months ago

Got a fix for it...

chunkysteveo commented 6 months ago

PR 91 fixes this issue - https://github.com/jonasniesner/open_epaper_link_homeassistant/pull/91

image

Image shows three icons (ignore graph!): icon: water - works as expected again and does not pick "liquid-spot". icon: weather-partlycloudy - works as an alias of weather-partly-cloudy. icon: weather-partly-cloudy - works as an icon as expected.