Advertisement
fablav

Deviatore ambra con cornice

Mar 4th, 2024
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.17 KB | Software | 0 0
  1. type: custom:mushroom-template-card
  2. entity: switch.caricacellulare
  3. icon: |
  4.  {% if is_state (config.entity, 'on') %}
  5.    mdi:toggle-switch
  6.   {% else %}
  7.    mdi:toggle-switch-off
  8.   {% endif %}
  9. icon_color: |
  10.  {% if is_state (config.entity, 'on') %}
  11.    amber
  12.   {% else %}
  13.    disabled
  14.   {% endif %}
  15. primary: |
  16.  {% if is_state (config.entity, 'on') %}
  17.    Deviatore acceso
  18.   {% else %}
  19.    Deviatore spento
  20.   {% endif %}
  21. tap_action:
  22.   action: toggle
  23. secondary: |
  24.  {% if is_state (config.entity, 'on') %}
  25.    destra
  26.   {% else %}
  27.    sinistra
  28.   {% endif %}
  29. card_mod:
  30.   style:
  31.     mushroom-state-info$: |
  32.      .primary {
  33.         padding-left: 10px;
  34.         font-family: cursive;
  35.         --card-primary-font-size: 22px;
  36.       }
  37.       .secondary {
  38.         padding-left: 10px;
  39.         font-family: cursive;
  40.         font-weight: 300;
  41.         --card-secondary-font-size: 18px;
  42.       }
  43.     .: |
  44.      ha-state-icon {
  45.         animation:  {{ 'pulse 2s ease-in-out infinite;' if not is_state('switch.caricacellulare', 'on') }};
  46.       }
  47.       ha-card {
  48.         box-shadow: {{ '0 0 5px 1px rgba(var(--rgb-amber), 1);' if is_state('switch.caricacellulare', 'on')}};
  49.       }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement