#Some card_mod stuff
1 messages Β· Page 1 of 1 (latest)
So, card mod is a bit tricker than just adding some settings like you did. It does modify the CSS but each card may be a little bit different. This example I'm about to post actually came from when I was card_modding a Markdown card. Turns out, in this case, most of it works for the entities card.
This is more than what you asked for but I think it turned out pretty cool so I'm posting the whole thing: ```yaml
type: entities
entities:
- light.living_room_lights
card_mod:
style: |
ha-markdown {
padding: 0 0 0 1 !important;
font-size: 12px !important;
font-weight: normal !important;
line-height: 1.4 !important;
}
ha-card {
font-family: Arial;
text-align: center;
width: 350px;
box-shadow: 0px 2px 5px 1px red;
border-radius: 25px;
{% if is_state('light.living_room_lights', 'on') %}
background-color: yellow;
color: black;
box-shadow: inset 0px 0px 5px 1px black;
{% else %}
background: transparent;
color: yellow;
box-shadow: inset 0px 0px 5px 1px yellow;
{% endif %}
} ```
@limber elbow Here's some more fun stuff for you to check out.
im using the badge cards along with the the custom badge cards from hacs, this how it currently looks ( see image 1 with the red cards), what im trying to do is increase the size of the person card at the top, without increasing the size of the others but when i add width:100px height 100px using the browser dev tool inspector to style it how i wanted to have it in this case ( .label-badge ) it increases the size of all the badge cards ( see image 2 ).
and no matter what i add into the raw config code it wont increase the size of the cards. 2 things i noticed that you have are
card_mod: but when i use this i get a error
** style: |** ive been using "styles" and im not sure what the | is used for.
Just my two cents here. I've never really cared for the badges. They're cool and all but they just seem too limited in capabilities to be useful. I don't mean that in the sense of conveying information, but, moreso, being able to customize them such as how you're trying to do.
IMO, I think you would have better "display-ability" if you were to design a custom:button-card https://github.com/custom-cards/button-card to replicate the look of the badges. It might take some work but you'd ultimately have more control over how it looks, such as, being able to change the color of the rings around the icon, for example, could be useful.
ok, ill try remake it using the button card π
button card suck π¦ like most of the i community stuff its never just a straight forward install and use lol
they aren't that bad LOL
i installed it, followed the instructions and boom error, after error so more trouble shooting to do then will have another crack at it tomorrow
I've been using button-cards for about three years. Was the first thing I installed via HACS. Never had any issues with it.
In fact, my dashboards are probably 85% custom:buttons-cards. (at least the visible stuff; not counting layout-related cards)
I had to break apart my testing views into two: one for custom:button-cards; one for Mushroom cards. Started another view for cards tha tI've helped people with; just had to start a second one of those. (I'm kind of a hoarder in that regards.)
i get Configuration errors detected: No type provided. then it says in the installation guide
add resources:
- url: /hacsfiles/button-card/button-card.js
type: module``
to the ui-lovelace.yaml which i can only assume is the dashboard raw configuration window but when i do that i get more errors π
that's not right
it should in in configuation.yaml
and not "add resources" just resources:
actually
I didn't even have to do that
it just worked
Are you not able to install via HACS? (Waaay easier...)
I only had to add card-mod
i tried putting it in the config.yaml and i get a error saying Integration error: resources - Integration 'resources' not found. i did install using hacs
You shouldn't have to do both; one or the other.
i tried 1 way didn't work, so tried the other way and still didn't work. im uninstalling it now
Did you have the add part of add resources:? I think it is supposed to be just resources:.
no i just put resource that add above awas a typo π
Go to Developer Tools > States > Check Configuration button and see if it spits back any errors.
Wait. Can you post a screenshot of the errors you're getting? You might just need to refresh and/or clear cache on your browser. (@limber elbow Why'd we forget the #1 troubleshooting step?)
ive uninstalled it and refreshing ha atm. will try re-installing again through hacs
well I'm at work and distracted
reinstalled it, put it into the configuration.yaml went to dev tools > check config > error
I don't think I ever put the resources into a ui-lovelace.yaml. I don't even know where that goes...
https://community.home-assistant.io/t/where-is-the-ui-lovelace-yaml-file/151744/5
says it goes into the raw config editor but i think thats now changed since 2019
Take out lines 26-29 from the first screenshot. I don't think that is needed. Then, try Developer Tools, States, Restart, Quick Reload. Refresh browser and/or clear caches.
so i took it out, checked config and then it was fine, restarted and cleared cache, tryped using 1 of the example buttons
Yeah. I think that it old stuff. Tinkerer made a comment:
In your configuration folder if youβre using YAML mode.
Most folks wonβt be, so youβll use the raw UI config editor.
type: custom:button-card
entity: switch.ac```
π
im configuring a layout for buttons for the new point of sale at the shop
so I'm doing buttons at work and buttons in my spare time, FML
But yeah, the - comes into play for other things but, in this case, not used.
Life is just full of buttons.
yay sucess π
kind of haha
thanks for the support, and the patience π now i can back it up and start trying to crack the styling tomorrow lol
There's a lot that it can to. Just a matter of tinkering with it to get it to work the way you want. Soon, you'll be incorporating JavaScript and card_mod to do even more. π (speaking from experience)
ive only had ha since friday last week so quite new to it and yaml, adding js to the buttons will come later on π
and then you'll end up with a test box at work and 2 test boxes at home
and your production box
and experimental shit on all of them
a test system for the test system
exactly