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

Custom fan card for govee fans using govee2mqtt - styling help

$
0
0

Hi, fairly new to homeassistant and managed to put together a card for my govee fan. Govee Fans added via govee2mqtt show up as separate entity and I have been able to add a fan card.

I put together a simple custom card for basic controls I care for but have not been able to format it to my liking. I want to achieve following

  1. Remove borders and customize margins
  2. Change card width such that oscilation toggle shows up in top right
  3. Format Fan Speed and have slider take up rest of the empty space in between

Appreciate the help!

image

type: custom:stack-in-card
mode: vertical
cards:
  - type: custom:stack-in-card
    mode: horizontal
    cards:
      - type: custom:mushroom-template-card
        primary: Fan
        secondary: "{{states('switch.living_room_power_switch')|title}}"
        icon: mdi:fan
        tap_action:
          action: perform-action
          perform_action: switch.toggle
          target:
            entity_id: switch.living_room_power_switch
        icon_color: ""
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                {% if is_state('switch.living_room_power_switch', 'on') %}
                  --shape-animation: spin 1s linear infinite;
                  --card-mod-icon: mdi:fan;
                  --card-mod-icon-color:#4fb7d1;  
                {% else %}
                  --shape-animation: spin 3s ease-out;
                  --card-mod-icon: mdi:fan-off; 
                  --card-mod-icon-color:grey;       
                {% endif %}
                display: flex;
              },
      - type: custom:mushroom-template-card
        icon: mdi:arrow-oscillating
        entity: switch.living_room_oscillation_toggle
        layout: horizontal
        primary_info: none
        icon_type: none
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                {% if is_state('switch.living_room_oscillation_toggle', 'on') %}
                  --shape-animation: spin 3s;
                  --card-mod-icon: mdi:autorenew;
                  --card-mod-icon-color:#4fb7d1;
                {% else %}
                  --card-mod-icon: mdi:autorenew-off; 
                  --card-mod-icon-color:grey;
                  --shape-animation: spin 3s ease-out;
                {% endif %}
                display: flex;
              },
  - type: custom:mushroom-number-card
    entity: number.living_room_fanspeed
    primary_info: none
    icon_type: none
    layout: horizontal

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105904

Trending Articles



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