Gauge naming in Graphs by device instead of room not practical

so I’ve baught a bunch of these bluetooth Temperature & humidity measures: https://www.amazon.de/ThermoPro-Raumthermometer-Luftfeuchtigkeitsmesser-Smiley-Indikator-Datengrafik/dp/B09P3K5778?pd_rd_w=0vmk8&content-id=amzn1.sym.7391a8ce-c894-43fa-ad30-4f5ea9b9f5b8&pf_rd_p=7391a8ce-c894-43fa-ad30-4f5ea9b9f5b8&pf_rd_r=H8FH63NERYKMQYS3GW8K&pd_rd_wg=GzUSI&pd_rd_r=5da02f4e-27b7-4624-a6a7-9befe6ac97d3&ref_=pd_bap_d_csi_prsubs_0_nped_t&th=1
and configured + distributed them across my rooms.
Now I’ve added all of them to a graph in “Verlauf”/history, and instead of the respective room names, the device IDs are shown in the graph:

  • TP357 (7E29) Temperature
  • TP357 (9D34) Temperature
  • TP357 (A9B6) Temperature
  • TP357 (E690) Temperature

which is not as nice to interpret. Having “Living Room”, “Kitchen” etc. would be way more practical.

You can rename your sensors or just override the name in the graph.

You could also use the card-templater card. It allows inserting templates into any card, which allows displaying the area instead of the entity name.

E.g.:

type: custom:auto-entities
card:
  type: grid
  title: Luftfeuchtigkeit
  columns: 3
  square: false
card_param: cards
filter:
  include:
    - or:
        - entity_id: sensor.bad_luftfeuchtigkeit
        - entity_id: sensor.kuche_humidity
        - entity_id: sensor.eve_room_df05_humidity
        - entity_id: sensor.schlafzimmer_esp32_humidity
        - entity_id: sensor.turmzimmer_epaper_esp32_humidity
        - entity_id: sensor.humidity
      options:
        type: custom:card-templater
        card:
          type: gauge
          entity: this.entity_id
          min: 0
          max: 100
          needle: true
          name_template: '{{ area_name("this.entity_id") }}'
          segments:
            - from: 0
              color: red
            - from: 20
              color: orange
            - from: 40
              color: green
            - from: 60
              color: orange
            - from: 80
              color: red

This uses GitHub - thomasloven/lovelace-auto-entities: 🔹Automatically populate the entities-list of lovelace cards to generate a list of cards and GitHub - gadgetchnnel/lovelace-card-templater: Custom Lovelace card which allows Jinja2 templates to be applied to other cards to show area name.

1 Like