#HELP Digital clock with HACS

1 messages ยท Page 1 of 1 (latest)

wanton stone
#

i have set it up but want it to be transparent

keen sentinel
#

install card-mod on hacs if you dont already have it then add the following section to the yaml for the digital clock card:

  style: |
    ha-card {
      background-color: transparent !important;
      border-width: 0px !important;
    }
keen sentinel
wanton stone
#

thanks so much

wanton stone
keen sentinel
#

have you done full refresh (ctrl+f5) since installing card-mod?

wanton stone
#

yes

#

like that

keen sentinel
#

can you post the yaml for the whole vertical stack

#

everything should work but perhaps someone else in the stack is doing something strange

shrewd cairnBOT
#

pong

wanton stone
#

type: custom:digital-clock
card_mod:
style: |
ha-card {
background-color: transparent !important;
border-width: 0px !important;
}

keen sentinel
#

thats just the yaml for the clock card. you seem to have the clock card inside of a vertical stack

wanton stone
#

yes

keen sentinel
#

at the bottom you can open the vertical stack code editor and see the full stack code editor

wanton stone
#

type: vertical-stack
cards:

  • type: markdown
    content: |

    Hello, {{ user }}

    Welcome Home ๐Ÿฅณ๐Ÿ˜๐Ÿก
    text_only: true
  • type: custom:digital-clock
    card_mod:
    style: |
    ha-card {
    background-color: transparent !important;
    border-width: 0px !important;
    }
#

sorry for not understanding i think that is it ๐Ÿ™

keen sentinel
#

use triple ` around your code paste
like this

wanton stone
#

โ€œโ€โ€
type: vertical-stack
cards:

  • type: markdown
    content: |

    Hello, {{ user }}

    Welcome Home ๐Ÿฅณ๐Ÿ˜๐Ÿก
    text_only: true
  • type: custom:digital-clock
    card_mod:
    style: |
    ha-card {
    background-color: transparent !important;
    border-width: 0px !important;
    }
    โ€œโ€โ€
keen sentinel
#

the key to left of 1

#

not quotes

#

discord messes with the formatting otherwise

wanton stone
#

โ€œโ€โ€
type: vertical-stack
cards:

  • type: markdown
    content: |

    Hello, {{ user }}

    Welcome Home ๐Ÿฅณ๐Ÿ˜๐Ÿก
    text_only: true
  • type: custom:digital-clock
    card_mod:
    style: |
    ha-card {
    background-color: transparent !important;
    border-width: 0px !important;
    }
    โ€œโ€โ€
keen sentinel
#

this symbol - `

wanton stone
#
cards:
  - type: markdown
    content: |
      # Hello, {{ user }}
      Welcome Home :partying_face::grin::house_with_garden:
    text_only: true
  - type: custom:digital-clock
    card_mod:
      style: |
        ha-card {
          background-color: transparent !important;
          border-width: 0px !important;
         }```
keen sentinel
#

copy my example and paste it if you have to

wanton stone
#

got it

keen sentinel
#

do you have something thing installed to make it show the emoji's? thats not default behavior

keen sentinel
#

this is the stock behavior

#

do you have any other custom stuff installed from hacs?

wanton stone
#

no but i need the clock to be transparent the message is already

keen sentinel
#

yeah i understand where your trying to get to and the code you have should work. i am trying to work out why it doesnt

#

what version of home assistant are you on?
and can you try it on another browser to see if the formatting is isolated to the browser?

wanton stone
keen sentinel
#

the only thing that i can think of is that card-mod is not working correctly. you could try uninstalling and reinstalling it

#

or you have some other custom theme or something interfering with how the cards are being drawn

cedar ridge
#

The custom: digital-clock card may not follow the same syntax found in stock cards. Stock cards, for the most part, use the same syntax. Devs for custom cards can do whatever they want. Another option to try is just background:. I'll try to inspect the card later this evening and get better info.

keen sentinel
#

both background-color and background work on my machine actually

cedar ridge
#

Looking at the code for the card, I think it uses background.

keen sentinel
#

try this

card_mod:
  style: |
    ha-card {
      background: transparent !important;
      border-width: 0px !important;
    }```
cedar ridge
#

Yeah. If you have it working on your side but it is not for the OP, then the browser may need refreshed and/or cache cleared. Reinstalling card-mod, like Michael mentioned, is another good option (followed by a refresh and cache clear.)

wanton stone
#

Card mod where do I get that

keen sentinel
#

...

#

on HACS

cedar ridge
wanton stone
#

dumb me ๐Ÿซข

#

Thanks for the help

#

How do you use 12 hours clock

keen sentinel
cedar ridge
#

If you want to "design" your own time card, you can use the Markdown card. This is for the top example: ```yaml
type: markdown
content: "{{ now().strftime("%m/%d/%Y, %H:%M")

To help with the strftime syntax, I recommend [Python strftime cheatsheet](<https://strftime.org/>)
The yellow one has template to handle to text and a bunch of card_mod for the styling.
#

This one is similar to the first example but has some card_mod to pin it to the top of the screen. ```yaml
type: markdown
content: "{{ now().strftime("%m/%d/%y, %H:%M") }}"
card_mod:
style: |
ha-card {
background: transparent;
color: white
}
:host {
position: fixed;
top: 0px;
right: 50%;
z-index: 99;
font-size:25px;
}

#

I forgot the Mushroom card's template card ```yaml
type: custom:mushroom-template-card
primary: |
{{ (states('sensor.date_time_iso') | as_datetime).strftime('%H:%M') }}
layout: vertical
icon: ""
card_mod:
style: |
:host {
--card-primary-font-size: 55px !important;
--card-primary-line-height: 1.0 !important;
}
ha-card {
border: none;
background: transparent;
}

wanton stone
#

Hello how can i center the Message?

#

โ€˜โ€˜โ€˜type: vertical-stack
cards:
- type: markdown
content: |
# Hello, {{ user }}
Welcome Home ๐Ÿฅณ๐Ÿ˜†๐Ÿ 
text_only: true
- type: custom:digital-clock
card_mod:
style: |
ha-card {
background: transparent !important;
border-width: 0px !important;
}โ€˜โ€˜โ€˜

keen sentinel
wanton stone
#

i need the hello welcome homein the center too

keen sentinel
#

then put center tags around that too