Number to Text in history-graph card? Dosent work?

How to get it to write out a text insted of numbers? have tried some code in config but dont get it to work. In custom:mushroom-template-card i have some code that is working, have found some code on this site but nothing works in dashboard card for history-graph, have tried to put some code in config yaml but i get error but no info in logs?
" Invalid config

The following integrations and platforms could not be set up:

  • [template.sensor]…home-assistant.io/integrations/template) (Show logs)

Please check your config and logs."

Log say:

Home Assistant Core

No problems was found for the searchword ‘template.sensor’

Cant upload more than 1 picture here so i put them on my drive but i cant link it here, i try now to not write the text together, yes it works now, just put it together after and before “drive” word and “https” then the url works. Thanks
https ://drive .google.com/ drive/folders/1LSp7TC4xq21XDU-KgNZ87luMmJyEWsNO?usp=sharing

A puzzle.
What do you want to achieve?
What is “text instead of numbers”?
And “mushroom-template-card” & “history-graph” are absolutely different cards.
Post a mockup made in MS Paint (or whatever) of your desired UI.

OK, managed to open your pictures.
If you want to see here labels instead of numbers:


like

then you need to create a template sensor like

template:
  - sensor:
      - name: labels
        state: >-
          {% if is_state('sensor.numbers','10') -%}
            yyy
          {%- elif is_state('sensor.numbers','30') -%}
            xxx
          {%- else -%}
            zzz
          {%- endif %}

or with some like “mapper” which you used for the mushroom-card.

Shall i remove the temple i try now in config yaml and take your insted? Or can i do it with i gui temple? Can u take som prints where and how u do it. Thanks :slight_smile:

Shall i remove the temple i try now in config yaml and take your insted? Or can i do it with i gui temple? Can u take som prints where and how u do it. Thanks :slight_smile:

Create a template sensor and then use it in your history-graph.
Use my code posted above as a starting point.