Adding prefix/Suffix to attributes using lovelace-multiple-entity-row

Hi there!

In my dashboard I want to add two formats for the sun next_rising attribute.

I’ve achieved this with the lovelace-multiple-entity-row addon however adding a prefix/suffix does not work, therefore the card looks like this:

image

Does anyone know how I can add some sort of divider between the two attributes?

Either “Or at” or just a simple pipe (|). I’m thinking this might be possible with a template but i’m not sure how to use them despite a few hours of research and playing around.

Here is the current card YAML:

type: entities
entities:
  - entity: sun.sun
    show_state: false
    type: custom:multiple-entity-row
    name: Sunrise
    entities:
      - attribute: next_rising
        name: false
        format: relative
        suffix: Test
      - attribute: next_rising
        name: false
        format: time

Here is a link to the lovelace addon.

Look into the markdown card instead.

Do not try using options which are not specified in Docs as available)))

You may add an additional “column” between & specify an icon looking like a separator:


Also, add “tap_action: none” for this icon…
More compact:

type: entities
entities:
  - type: custom:multiple-entity-row
    entity: sun.sun
    show_state: false
    entities:
      - attribute: next_rising
        format: time
        styles:
          margin-right: 0
      - icon: mdi:slash-forward
        styles:
          margin-right: 0
          width: 24px
        tap_action: none
      - attribute: next_rising
        format: relative

Suggest to ask all m-e-r-related questions in the main thread.

This is what I meant by “does not work” - as in the addon does not support attribute prefix & suffix. The line was left in from my testing, but wasn’t removed immediately as it wasn’t causing an error or breaking the card. But thank you.

I didn’t realise there was a M-E-R forum so I apologise.

Thanks for your help with this!

You are welcome.
Almost every popular custom card has a dedicated thread in “Show your projects”.

That’s good to know.

I’ll use that in future if it’s custom related.