kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.87k stars 231 forks source link

How to automatically show the area of the sensor as a title ? #1019

Closed Diplo95 closed 8 months ago

Diplo95 commented 8 months ago

Hi,

firstly, I would like to thank you for the great work !

Here is my question : I try to put a title to a horizontal stack. Maybe a picture would be clearer :

Capture d’écran du 2023-10-22 20-32-39

So I tried this code (But, as you can see, the result is not what I expected. Could you tell me what I'm missing ?) :


title: " {{ area_name('sensor.temp_hum_1_temperature') }} "
cards:
  - type: custom:mini-graph-card
    entities:
      - sensor.temp_hum_1_temperature
    line_color: '#e16366'
    icon: mdi:tree
    line_width: 8
    font_size: 75
    unit: °C
    name: Température
  - type: custom:mini-graph-card
    entities:
      - sensor.temp_hum_1_humidity
    line_color: '#4e93dd'
    icon: mdi:wave
    line_width: 8
    font_size: 75
    unit: °C
    name: Humiditée```````  
ildar170975 commented 8 months ago

This is not related to mini-graph-card since you are looking for a way of using a templated title of a conventional horizontal stack.

Diplo95 commented 8 months ago

Ok, sorry for my lack of competence in HA !

ildar170975 commented 8 months ago

This is not a problem at all. Please create an issue here: https://community.home-assistant.io/c/configuration/frontend/33 ie in Configuration - Frontend section People (incl. me) will see it and come to help!