Template-entity-row no longer showing icons

Hi folks.

Looking for some help with icons not showing in my entities card. I have an entities card with 8 entities, 3 of which are generated by custom:template-entity-row entries. Icons show okay for the standard entities, but they no longer show for the template-entity-rows.

They were okay when the entities card was first added a couple of months ago…and I’m sorry that I wasn’t more vigilant in watching when this happened so I’m not able to say what version of HA it worked on. Anyway, it’s not working now.

Sorry to be posting such a newbie basic question as I consider myself reasonably competent in such matters. This has, however, stumped me.

This is the code for the card

entities:
  - entity: sensor.solar_accounting_cost_rate
    name: Import Peak Rate
  - entity: sensor.solar_accounting_compensation_rate
    name: Export Rate
  - type: custom:template-entity-row
    icon: mdi:plus
    name: Import Costs
    state: >-
      £{{ ((states('sensor.solar_imported_power_daily') | float(0)) *
      (states('sensor.solar_accounting_cost_rate') | float(0))) | round(2)}}
  - type: custom:template-entity-row
    name: Export Compensation
    icon: mdi:minus
    state: >-
      £{{ -((states('sensor.solar_exported_power_daily') | float(0)) *
      (states('sensor.solar_accounting_compensation_rate') | float(0))) |
      round(2)}}
  - entity: sensor.solar_accounting_total_daily
    icon: mdi:equal
    name: Electricity Bill
  - type: custom:template-entity-row
    icon: mdi:piggy-bank
    name: Cost Saving
    state: >-
      £{{ -(((states('sensor.solar_panel_to_house_daily') | float(0)) +
      (states('sensor.solar_battery_out_daily') | float(0))) *
      (states('sensor.solar_accounting_cost_rate') | float(0)) * 3.33) |
      round(2)}}
  - entity: sensor.solar_accounting_total_weekly
    icon: mdi:equal
    name: Electricity Bill Weekly
  - entity: sensor.solar_accounting_total_monthly
    icon: mdi:equal
    name: Electricity Bill Monthly
  - entity: sensor.solar_accounting_total_yearly
    icon: mdi:equal
    name: Electricity Bill Yearly
  - entity: sensor.solar_imported_power_daily_cost
  - entity: sensor.solar_exported_power_daily_compensation
show_header_toggle: false
state_color: true
title: Financials

This is how the card looks.

Thanks

1 Like

Workaround: Icons not being displayed or formatted after upgrading to 2023.2.x · Issue #100 · thomasloven/lovelace-template-entity-row · GitHub

1 Like

Okay, so I followed the instructions in the workaround to the letter and I still have no icons.

Any other suggestions or should I just create the entities I need in templates in the main code and add those entities to my card?

actually, ignore what I just said as all my icons have come back!

Thanks @pedolsky

1 Like