Style Tile: more-info

while I was at it, I had to change the card_mod for the Tile fan card…as it stopped coloring accordingly, and the icon didnt animate anymore somehow

maybe its not as optimal as it could be, but it is robust and I include it on all of my fan tiles:

      type: tile
      entity: fan.woonkamer
      card_mod: !include /config/dashboard/card_mods/tile_fan_animate.yaml

and this include (note the required card_mod: is already in the main cards config…)

# tile_fan_animate
style:
  hui-card-features$:
    hui-fan-speed-card-feature$: |
      ha-control-slider {
        --control-slider-color:
          {% if is_state(config.entity,'on') %}
          {% set perc = state_attr(config.entity,'percentage')|int(0) %}
          {% if perc <= 15 %} lightblue
          {%- elif perc <= 33 %} lightskyblue
          {%- elif perc <= 67 %} dodgerblue
          {%- else  %} darkblue
          {%- endif %}
          {%- else %} var(--state-inactive-color)
          {%- endif %} !important;
        --control-slider-background:
          {% if is_state(config.entity,'on') %}
          {% set perc = state_attr(config.entity,'percentage')|int(0) %}
          {% if perc <= 15 %} lightblue
          {%- elif perc <= 33 %} lightskyblue
          {%- elif perc <= 67 %} dodgerblue
          {%- else  %} darkblue
          {%- endif %}
          {%- else %} var(--state-inactive-color)
          {%- endif %} !important;
      }
  .: |
    ha-tile-icon {
      --tile-color:
        {% if is_state(config.entity,'on') %}
        {% set perc = state_attr(config.entity,'percentage')|int(0) %}
        {% if perc <= 15 %} lightblue
        {%- elif perc <= 33 %} lightskyblue
        {%- elif perc <= 67 %} dodgerblue
        {%- else  %} darkblue
        {% endif %}
        {% else %} var(--state-inactive-color)
        {% endif %};
    }
    ha-state-icon {
      animation:
        {% if is_state(config.entity,'on') %}
          {% set perc = state_attr(config.entity,'percentage')|int %}
          {% set base =
            'rotation infinite linear' %}
          {% if perc <= 15 %} 4s {{base}}
          {%- elif perc <= 33 %} 3s {{base}}
          {%- elif perc <= 67 %} 1.5s {{ base}}
          {%- else  %} 0.75s {{base}}
          {% endif %}
        {% else %} none
        {% endif %};
    }
    @keyframes rotation {
      0% {transform: rotate(0deg);}
      100% {transform: rotate(360deg);}
    }

Ofc, and thats why I post it here, this also need a more-info mod yet, aas it now only colors the main tile