Custom Secondary Info for Entities Card

What a shame … it was a fault config bug with card-modder … its solved

@manzn - does that mean that it works for you without any flickering issues?

The problem was the second line was not visible - buggy in the config file…

flickering issues exist :frowning:

Just what I was looking for! Is there any way to incorporate viewing dates in relative time? Like: format: relative
Btw, no flickering for me on Chrome!

Hello, thanks for your card. It would be a true awsome feature to use another entity. Could you please make it happen?

I hope that someone will do it.

Would this work in combination with another custom entity? If so, should it be the parent or child of that entity?

I’m working on customising the already custom:slider-entity-row, and so far, I got rid of the switch and birghtness, and allowing for custom length of the slider. That is to allow more space for the title of the entity on mobile devices. But adding custom secondary info properties to that is beyond my JS skills, i just know a little on how to modify the html and css.

How can I output custom text?
e.g.

  type: entities
  title: Devise's Batteries
  entities:
      - entity: sensor.battery_switch_158d00021312d4 #Door bell
        secondary_info: CR2032
        name: Doorbell 

I want to show battery type (e.g. CR2032) for each sensor in list.

A quick update…

I had been holding off on developing an update until the official Lovelace release - especially to see if that might help address the flicker issue. With the release imminent, I rewrote this custom entity row from scratch, and took advantage of Thomas Lovén’s card-tools.js library. So far it is appears to be working well, and it also leverages his template parser for the secondary info text. So that should address the many requests for static and dynamic text values (including cross-entity).

I will post the new code to GitHub later this week.

6 Likes

Hey!

I just heard about this plugin. Looks awesome!
It’s a feature I have gotten requests for every now and then, but have been holding off on (mainly because of this nightmare).

Perhaps we can work together on comming up with a solution to make this work with slider-entity-row as well…

I think this could benefit from card-tools, but I’d like you to know that I’m planning a 0.3 release with some new recommendations soon after Home Assistant 0.86 is released.
There’s a preview version available here. With the new way of checking for card-tools presence and cardTools.createEntityRow the flicker should be gone with 0.86.

2 Likes

I can’t wait for the update, thanks.

Could it be possible for you to add this feature to your coming card:

  • on a regular entity row display a badge(from a different entity) before the status.

It would be awsome. I miss the custom ui versatility and this fearure would makes me forgett about it.

4 Likes

@thomasloven, thanks for checking in. Looks like we’ll need to collaborate a bit on the implementation. My code works reliably with the last card-tool commit from January 11. However, it appears to have broken after your commit to master yesterday, and remains broken with your .03/next branch as well.

I will push my updates to GitHub so you can see them, and maybe we can discuss more on Discord.

Oh! I accidentally included one change that won’t work until 0.86.

Oh well… the release is just hours away anyway…
In the meantime, try putting card-tools first in the resources: list. That could help.

Got it - will take a look later today. In the meantime, my updated code can be found here - it’s pretty straightforward. https://github.com/MizterB/lovelace-secondaryinfo-entity-row/tree/card-tools-integration

Updated version just released:

This is a full rewrite, so you’ll need to remove the old code and associated config. Please review the updated README for more info.

Please note that this requires in the installation of the latest card-tools.js (version 0.3) and HA .86

Once again, no flicker for me. Hopefully this solves the problem for everyone else too!

4 Likes

Thanks a lot, I’m just trying it now.

Should it work with sensors? I’m trying to show the brightness of a light, but can’t get it to work.


As you'll see the sensor at the bottom shows the brightness, but when I try to add it to secondary-info it doesn't display correctly.

Here’s the code I’m trying with

- title: Office
    id: card_office
    show_header_toggle: false
    type: entities
    entities:
      - entity: light.office_light
        name: "Office Light test"
        type: "custom:secondaryinfo-entity-row"
        secondary_info: "[[ sensor.office_light_brightess ]]"
      - sensor.office_light_brightess

Maybe?

secondary_info: "[[ sensor.office_light_brightess.state ]]"
1 Like

Excellent!!! Thanks @MizterB it works perfectly.

template

That is correct. You need to use
<domain>.<entity_id>.<something else>

See

1 Like

That’s it, thanks!

This is looking great, and definitly useful. Everything works fine on my setup :slight_smile:.

Is there a way to format the date of attributes such as last_triggered?