Templates - how to get another entity's icon?

I’m trying to create a replica of the Weather entity, but translating the (descriptive) condition to my local language (using a sequence of if/elseifs). The valuetemplate works just fine.
I could use the same if / elseif chain of course to set the mdi icon for this new entity, but perhaps there is an easier way to get the string of characters representing the weather’s icon (e.g. mdi:weather-cloudy) just like you can access attributes?

you can only access the icon if the icon attribute is present. Many things using device_class will not have an icon attribute and you’ll be unable to get the icon.

In my HA instance I had a similar need, for one entity I wanted to show its icon but not its state, I wanted to show the state of another entity.
First a little background:
One of my views shows weather forecast data and also data for the current weather. Since I don’t have my own hardware/sensors to be able to show the current weather, I use an integration for it, Trafikverket Weather Station, which suits me well because there is a station quite close to where I live. That integration has among others an entity, Precipitation type, whose options are as shown below:
options:

  • “no”
  • rain
  • freezing_rain
  • snow
  • sleet
  • “yes”

However, when its entity state is “no” it is shown as None (in English) in the Lovelace UI but as I am living in Sweden I wanted it to show the Swedish word Ingen instead. Hence, I wanted to show the icon from the integration for the Precipitation type entity but not its state so I needed to fix it.
My solution:
In my HA instance I sometimes use a custom row element for the entities card, multiple-entity-row, to be able to present data the way I like it, I used that for this as well. First I made a value_template sensor to be used to show the precipitation type state the way I wanted:

sensor:
  - platform: template
    sensors:
      precipitation_type_placeholder:
        # Takes care of not showing 'None' in frontend when no precipitation, with this 'Ingen' is shown instead
        unique_id: 'f653e4fe-3826-4c4e-9fcd-a38455272b50'
        value_template: >
          {% if is_state('sensor.precipitation_type', 'no') or is_state('sensor.precipitation_type', 'yes') %}
            Ingen
          {% else %}
            {{ states('sensor.precipitation_type') }}
          {% endif %}

That sensor was then combined with the sensor from the integration, sensor.precipitation_type, in a multiple-entity-row for an entity card:

- type: vertical-stack
  cards:
    - type: entities
      title: 'Väder'                  # 'Weather' in English
      show_header_toggle: false
      entities:
        - type: custom:multiple-entity-row
          # Row using the sensor.precipitation_type icon and the sensor.precipitation_type_placeholder state
          entity: sensor.precipitation_type
          name: 'Nederbörd'           # 'Precipitation' in English
          show_state: false
          column: false
          entities:
            - entity: sensor.precipitation_type_placeholder
              name: false

The multiple-entity-row custom row element is great!