Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105897

Tap Action on large time and date card

$
0
0

I like having the time and date in the first position of my dash, and I’ve used a variety of ways of displaying them, and currently use markdown cards:

type: vertical-stack
cards:
  - type: markdown
    card_mod:
      style: |
        ha-card {
          color: var(--primary-text-color);
          background-color: #000000;
          border-color: #000000;
          font-size: 6em;
          margin-bottom: 4px;
          margin-top: 10px;
          text-align: center;
          font-weight: bold;
        }
    content: |-

      {{now().strftime('%H')}}:{{now().strftime('%M')}}
    tap_action:
      action: null
      service: homeassistant.toggle
      entity_id: input_boolean.xlo
  - type: markdown
    card_mod:
      style: |
        ha-card {
          background-color: #000000;
          border-color: #000000;
          color: var(--primary-text-color);
          font-size: 2em;
          margin-bottom: 1px;
          text-align: center;
          font-weight: bold;
        }
    content: >-

      {% set dayz = ["Mon", "Tue","Wed","Thu","Fri","Sat","Sun"] %} 

      {% set monthz = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
      "Sep", "Oct", "Nov", "Dec"] %}

      {{ dayz[now().weekday()] }},  {{monthz[now().month-1] }} {{now().day}},
      {{now().year}}
    columns: 1
    tap_action:
      action: null
      service: homeassistant.toggle
      entity_id: input_boolean.xlo

Now I would like to add a tap_action, specifically to toggle the visibility of a conditional with 15 button-cards on it. Someone on reddit suggested doing this with custom:button-card’s, which can show the time and date, but I can’t see how to get the large font, format the date, and the entity sensor.time doesn’t seem to produce the digital military time. I realize custom:button-card has a wealth of formatting options and indeed I use them extensively.
card
The picture shows part of my dashboard, but on the tablet dash the time is large enough to see across the room.

Anyone have a related solution?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>