looking for some help with defining the style code. I want to simply add âmarginâ to the camera view to push the card down (so I can see the date and time). I hacked the console to add margin, so you can see the bottom camera image is shown the way I want it, but i cannot figure out what the style code looks like. Any help?
I have two questions. Sorry if these seem like basic questions, but I was not able to solve these myself. First, Iâm trying to use card-mod with the following setup. The card consists of a entities card, which has two auto-entities cards inside it. The auto-entities cards are using glance as the card.
I have already succeeded with removing the borders of the auto-entitites (glance) cards and changing the size of titles. However, I would like to bold out or apply italics to the line number (235, 550, 39, A etc.) from each entity. Does anybody have suggestions on how to achieve this? Iâve tried to inspect element, but didnât find anything noteworthy.
Second question: Iâm trying to add conditional coloring to entities cardâs states. So that the icon and entity name would always display as normal, but the state would change between red and green.
I was able to change to whole rowâs color based on the state, but I would like to only change the color of the state (and not the entity name). In my example, the state is <div class="text-content">-âŹ291.40</div>. How can I achieve this?
New to card mod (and css altogether) so trying to get my head around a few things so some advice would be appreciated.
Here is my current sensor card.
And my custom:mini-graph-card with a touch of card-mod to try and get the icon, header text colour, value colour and unit of measurement colour the same as the standard sensor card (with the âslateâ theme).
Three questions:
Can some assist with code on the colours for the text?
Is there a way to reduce the size of the card altogether? Iâve been trying to get it about 75% of its current height but nothing seems to work.
Is there a way to transition though all my colour values without listing them all as Iâve done?
Iâm trying to use card-mod to colour the background of entities on a glances card. I plan to adjust background colour according to temperature (havenât done that bit yet). I would like to adjust padding and margin, but notice that only some of these settings donât take.
Thanks for the quick response @eggman, but that doesnât seem to be the answer. All of the examples I have seen are without quotes. In any case - trying it in my cases didnât make any difference.
Ah, yes - usually that parameter is a string value of an entity id, I hadnât realised it could also be a variable referring to the current entity in a card.
OK - I think I see what you mean - I think Iâve misunderstood the use of config.entity.
I had hoped it would allow me to set some dynamic CSS (eg set colour based on temperature) at the card level, which would be applied to each entity in turn at render time. But I think you are saying that I must do this at the entity level, which means reentering the same dynamic CSS code for each entity. A little verbose, but I guess it gets the job done.
Since HA 110 changes the way it handles icons, the âoldâ custom-ui way of customizing icon_color doesnt work anymore. Which is a major bummer, since custom-ui was able to customize entities globally, and every where in HA these entities are displayed with their customizations. Any card, be it custom or core, and, importantly, in the more-info.
Did file a feature request to please add a new way of customizing entities in Ha core Frontend, but that will be a long shot I fear.
So, trying my best to customize icons with whatâs available right now, and using your card-mod Style of course. But, that only styles the entities in a Lovelace card, and not their more-info, as the quote above already indicates.
Iâve managed to template the icon color in an auto-entities card and would really have that functionality used in more-info. Which, without the color, in fact will be a Less-info from Ha 110 onwardâŠ
Since your answer above was a long time ago (talking Ha development time), I was wondering if you know of a way yet to globally customize items, so the more-info on the entity is also customized?
If not, could you give me a pointer what to look for in the âoldâ custom-ui, and what has been changed in the 110 HA icon handling, so I can try to adapt that script to that? I havenât been able to find that in the GitHub.
thanks for having a look.