A while ago, I created card-mod, a custom card* that lets you change various css options for other lovelace cards.
Much more skilled people than I have used that to create beautiful and awesome things.
Today, Iāve added theme support to card-mod.
Your ordinary theme file can now be used to
Give cards a flashing border
Make that border only flash when a certain entity is in a certain state
Make fan icons spin when they are on
Change the border color of the badges at the top of the screen depending on their entity type
Make the header bar transparent
Change the position of the more-info-dialog
Display the battery charge of any entity that has a battery in the secondary-info line in entities cards
Further clarify the battery charge by means of a bar graph in the background of the same row.
Change the lovelace background if your user name is Bob
Hide the header toggle of all entities cards by default
Make all glance cards green, except the ones the user says should be pink
Move the badge row to the bottom of the view
Space out the cards a bit more, or squeeze them together
Add mouse-over effects to the rows in entities cards
and much much more. Really, the possibilities are far from endless, but much closer to it than ever before!
And all the end user will have to do is:
Install card-mod from HACS
Install your theme
Enable your theme
The documentation for those new features is stillā¦ somewhat lackingā¦ but I just couldnāt wait to see what all the skilled theme creators could do with this.
Iāll gladly answer any questions and offer support, though.
Thereās two demo themes available. Please see the topic below for more info:
It is very fast though and I like that I am no longer messing with system cards like the configuration / integration page (the background image did not fit well).
The ha-card element is the one that gets the class added, and the mmp-shortcuts element is a child of that, so ha-card.media-player mmp-shortcuts { may work.
I have a weird issue. I finally decided to bite the bullet to 113 and updated many card-mod and browser-mod related stuff. All works great now (a few minor glitches aside). One thing I do notice though: the more-info styling doesnāt work properly on iOS. I used to have a backdrop filter with a blurred effect. That pluging doesnāt work anymore, but card-mod 2.0 supports that as well. I use the exact same theme across all my devices (iOS, Android and Chrome browser on Win10) and the following style (under theme yaml) works excellent on desktop/Android:
It gives me a nice blurred darkened background. On iOS however, it does not apply the blur. It does apply the darkened effect. Is this an iOS related issue? I havenāt seen a post yet, so thatās why I wanted to ask around. I cleared cache withing HA app (also withing iOS settings for Safari) and tried with the HA app and Safari on iOS.
I also notice the header bar is white on iOS, while it is transparent as it should be on desktop. It seems to take the primary-color (or background-color, those are same color on my theme). When I use my night theme, the status bar is black on iOS (while transparent on desktop).
Can you please tell me about the āclassā section you have under the Lovelace card setup? I didnāt see any of this in the example theme, unless Iām missing a file. Does that need to be on every card? Can you define multiple themes for the same Lovelace card type? Inheritance? Overrides?
HI Thomas, might I ask in this thread about an issue I have since updating (either to HA 113, or card-mod, I cant say honestly) and point here to prevent crossposting too much?
Having an inspector error, while HA seems to do alright in the frontend.
Hope you ca have a look, thanks.
That did the trick! I added that as an extra line so I have it on both iOS devices and Android/Chromium.
I think the status bar not becoming transparant on iOS has something to with the popup-light-card Iām using. Standard āmore infoā views are transparent. Gonna dig deeper into that.
Thanks a lot for your time and help, once again
edit:
I did some more digging around, and found out that the popup bar changes to background-color depending on the size. When I resize it untill it goes white on desktop, I see the following line: