I have created a custom row for the Entities card, which allows you to display an attribute value in the ‘secondary info’ section of an entity row. This extends the existing functionality that is currently limited to entity-id and last-changed values.
This is an initial release, but is working well for me so far. Now I’d like to get feedback from others. If it would be useful to you, please give it a try and let me know what you think!
For the moment, the attribute is coming from the same entity, but it would be trivial to change it - just need to decide on a config syntax for seeing that up.
Interesting that there is still a flicker…it’s something that I experienced in an earlier version when the entity was updated. I tried to prevent it by pre-rendering changes in a hidden div.
@jmart518 - What type of entity are you seeing the flicker on?
@gerard33 - When you say ‘it appears constant’ - do you mean it is constantly flickering? If so, how frequently?
It flickers every second. The secondary info shows and the disappears then shows again and so on.
And when I go to another menu item (tab) in HA and switch back again to the tab with this card, it doesn’t show the secondary info anymore. I have to refresh Lovelace before it shows again.
I can’t seem to reproduce the flickering issue on my system. Could we try to align on a test case?
Assuming you guys have the sun sensor enabled, could you try setting up the following?
- entity: sun.sun
name: Sun (Custom)
type: "custom:secondaryinfo-entity-row"
secondary_info: attribute:next_dawn
My tests have been run on both Chrome & Safari (MacOS). If you have access to the same, that’s ideal , but if not, maybe try testing w/ any version of Chrome? Thanks.
Thank you for the animated gif…looking at the individual frames, I can see that you are having the same issue I originally had. The flicker is the result of an update - during the update process, it starts by rendering the ‘standard’ entity row, which does not have the secondary info (it is empty). Then shortly after, the updated secondary info is populating. This changes the alignment, pushing the entity name from center to top, then adds the second line. This alignment change and populating of the secondary info is what you are seeing as ‘flicker’. If you look carefully at the animation, you can see what I am describing.
As I mentioned earlier, I thought I had fixed that problem by pre-rendering the update in a hidden div. But clearly that isn’t working for you guys. I’ll try to test in Windows, which seems to be the primary testing difference identified so far.
I just checked in a fix for the secondary info text disappearing after navigating to other views. It’s possible that this could also solve the flicker (which I still can’t recreate). Please test and let me know.
I have updated to the new version and it still flickers.
Using the new version (updated version in resources and cleared cache), using the sun.sun code from your example, Chrome on Windows 10.
The issue were the text disappears after switching to another tab is solved
The other…I’ve now tried testing in Chrome on Windows 10. Still not seeing the flicker.
My Chrome version is the latest: Version 71.0.3578.80 (Official Build) (64-bit)
Maybe we need to compare HA versions? I just realized I was a release behind on my dev system. Now I am on 0.83.3 (latest), and it continues to work fine for me.
I should also put out the question - is there anyone out there who is not seeing flicker (like me)?
Unfortunately, no. I still can’t recreate the flicker on any of my devices, and I don’t have the time to chase a ghost right now. If anyone with the problem is able to troubleshoot (or send me a PR), I’d be happy to take a look at it.