Also search in the icon aliases for the supplied icon name.
I'm using the state of a weather entity to determine an icon. However, the weather entity state often doesn't 100% correlate to the icon name, but to one of its aliases. For example the state will be partlycloudy, while the icon's name is (weather-)partly-cloudy, one of the aliases is (weather-)partlycloudy though.
So with allowing the icon's aliases I won't have to manually convert names, but I can just use weather-{{ states('weather.some_entity') }} (hopefully, I haven't checked all weather states & corresponding icons).
Also search in the icon aliases for the supplied icon name.
I'm using the state of a weather entity to determine an icon. However, the weather entity state often doesn't 100% correlate to the icon name, but to one of its aliases. For example the state will be
partlycloudy
, while the icon's name is(weather-)partly-cloudy
, one of the aliases is(weather-)partlycloudy
though.So with allowing the icon's aliases I won't have to manually convert names, but I can just use
weather-{{ states('weather.some_entity') }}
(hopefully, I haven't checked all weather states & corresponding icons).