#card_mod markdown card
1 messages · Page 1 of 1 (latest)
The markdown card itself can also be card_modded. I haven't played with this one in a while but I was able to create this primarily with card_mod.
type: markdown
content: |-
{% set time = now().hour %}
{% if (time >= 18) %}
Good evening, {{user}}!
{% elif (time >= 12) %}
Good afternoon, {{user}}!
{% elif (time >= 6) %}
Good morning, {{user}}!
{% elif (time >= 0) %}
Good night, {{user}}!
{% else %}
Hallo, {{user}}!
{% endif %}
Today is **{{ now().strftime('%B %d, %Y') }}**
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: 150px;
box-shadow: 0px 2px 5px 1px red;
border-radius: 25px;
margin-left: auto;
margin-right: auto;
margin-top: 4px;
margin-bottom: 4px;
padding-top: 15px;
padding-right: 15px;
padding-left: 15px;
padding-bottom: 15px;
padding: 15px !important;
{% if is_state('light.bedroom_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 %}
} ```
card_mod markdown card
I tried the above; but doesn't appear to have any effect.. as is.
Setting padding to just 0, results in 0 padding, but anything other than 0 (1, 4,etc or negative,) has no impact..
I wonder if its because the "Markdown" coding (the # for header text) is taking priority, preventing anything from effecting it.
Try placing card_mod to adjust the padding of the vertical-stack card too. You're working with two cards there that each have their own settings.