Mar1us
(Mar1us)
1
Hi,
i currently have the following in the markdown card:
YAML Code
type: markdown
content: >2
{% set weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] %}
{% set months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
<font size='10'>{{ now().strftime('%H:%M') }}
<font size='5'>{{ weekdays[now().weekday()] }} - {{ now().day }} {{
months[now().month - 1] }} {{ now().year }}
text_only: true
card_mod:
style: |
ha-card {
font-weight: bold;
text-align: center;
}
this is working fine but i want that the font size of the time will be bigger and if i increase the size nothing happens anymore.
tom_l
2
Try:
type: markdown
content: >2
{% set weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] %}
{% set months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
# {{ now().strftime('%H:%M') }}
<font size='5'>{{ weekdays[now().weekday()] }} - {{ now().day }} {{
months[now().month - 1] }} {{ now().year }}
text_only: true
card_mod:
style: |
ha-card {
font-weight: bold;
text-align: center;
}
Shouldn’t a font size be defined in px?
tom_l
5
Make sure the # is hard up against the margin (in column 0)
WallyR
(Wally)
6
Maybe you can get some solutions from this?
Mar1us
(Mar1us)
7
tried it but makes no difference
Mar1us
(Mar1us)
8
if i do this:
{% set weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] %}
{% set months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
<font size=10px>{{ now().strftime('%H:%M') }}
# {{ now().strftime('%H:%M') }}
<font size='5'>{{ weekdays[now().weekday()] }} - {{ now().day }} {{ months[now().month - 1] }} {{ now().year }}
the time is bigger
but if i remove the <font size>
row the time goes small again:
{% set weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] %}
{% set months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
# {{ now().strftime('%H:%M') }}
<font size='5'>{{ weekdays[now().weekday()] }} - {{ now().day }} {{ months[now().month - 1] }} {{ now().year }}