flixlix / power-flow-card-plus

A power distribution card inspired by the official Energy Distribution card for Home Assistant
577 stars 72 forks source link

[BUG] Unable to display string from a template #613

Open lgm42 opened 5 months ago

lgm42 commented 5 months ago

Hello, I' would like to indicate the color of the day (French Power provider). It can be Blue, White or Red. An entity provide it to me into the entity: 'sensor.rte_tempo_couleur_actuelle'

image

I would like to see this string into the home circle as a secondary info

So I make following configuration:

entities:
  home:
    subtract_individual: false
    secondary_info:
      entity: sensor.rte_tempo_couleur_actuelle
      display_zero: true
      template: '{{states(''sensor.rte_tempo_couleur_actuelle''}}'
...

And I obtained Following result:

image

My information is marked as a javascript object: '[Object:object]', but the template home assistant tools says that it is a string. Did I miss something ?

Desktop (please complete the following information):