#Tile card card_mod

1 messages · Page 1 of 1 (latest)

sterile torrent
#

This was kind of a hassle to figure out; the card's structure changed at some point so information out there is probably outdated. I managed to piece a bunch of stuff together. You can pick and choose what would want to use from this example:

#
type: tile
entity: binary_sensor.living_room_door_on_off
show_entity_picture: true
vertical: false
name: sliding door
card_mod:
  style: 
    ha-tile-info$: |
      .primary {
        font-size: 20px !important;
        font-family: arial;
        font-weight: bold;
        font-style: italic;
        color: white !important;
      }
      .secondary {
        font-size: 10px !important;
        color: gray !important;
      }
    .icon-container .icon$: |
      .shape { 
        border-radius: 15px !important;
        background: 
          {% if is_state(config.entity, 'on') %}
            rgba(255,0,0,0.2)
          {% else %}
            rgba(0,255,0,0.2)
          {% endif %} !important;  
      }
    .: |
      ha-card {
        background: black;
        width: 200px;
      }
      .icon {
        --tile-icon-color: 
          {% if is_state(config.entity, 'on') %}
            red
          {% else %}
            green
          {% endif %} !important;
      }```