『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 333|回复: 1

[技术探讨] 求助:mushroom的template卡片怎么去边框

[复制链接]

16

主题

103

帖子

619

积分

高级会员

Rank: 4

积分
619
金钱
516
HASS币
0
发表于 2024-2-21 11:14:52 | 显示全部楼层 |阅读模式
我这拼起来的mushroom template总是有个边框,求助怎么去掉呢:
1234.png
配置如下:
type: custom:stack-in-card
mode: horizontal
cards:
  - type: custom:mushroom-template-card
    primary: '{{ state_attr(entity, ''friendly_name'') }}'
    secondary: '{{ states(entity) }}'
    entity: input_select.ren_lian_ji_he
    tap_action:
      action: none
    hold_action:
      action: none
    double_tap_action:
      action: none
    card_mod:
      style: |
        :host {
          border: transparent;
        }   
    icon: |
      {% if is_state(entity, '家人') %}
        mdi:numeric-1
      {% elif is_state(entity, '亲戚') %}
        mdi:numeric-2
      {% elif is_state(entity, '朋友') %}
        mdi:numeric-3
      {% elif is_state(entity, '测试') %}
        mdi:numeric-4      
      {% else %}  
        mdi:numeric-0
      {% endif %}   
    icon_color: |
      {% if is_state(entity, '家人') %}
        orange
      {% elif is_state(entity, '亲戚') %}
        red
      {% elif is_state(entity, '朋友') %}
        pink
      {% elif is_state(entity, '测试') %}
        blue        
      {% else %}  
        grey
      {% endif %}
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        entity: input_select.ren_lian_ji_he
        tap_action:
          action: call-service
          service: input_select.select_option
          data:
            option: 家人
          target:
            entity_id: input_select.ren_lian_ji_he
        icon: mdi:numeric-1
        icon_color: |
          {% if is_state(entity, '家人') %}
            orange   
          {% else %}  
            grey
          {% endif %}        
        content_info: none
      - type: template
        entity: input_select.ren_lian_ji_he
        tap_action:
          action: call-service
          service: input_select.select_option
          data:
            option: 亲戚
          target:
            entity_id: input_select.ren_lian_ji_he
        icon: mdi:numeric-2
        icon_color: |
          {% if is_state(entity, '亲戚') %}
            orange   
          {% else %}  
            grey
          {% endif %}            
        content_info: none
      - type: template
        entity: input_select.ren_lian_ji_he
        tap_action:
          action: call-service
          service: input_select.select_option
          data:
            option: 朋友
          target:
            entity_id: input_select.ren_lian_ji_he
        icon: mdi:numeric-3
        icon_color: |
          {% if is_state(entity, '朋友') %}
            orange   
          {% else %}  
            grey
          {% endif %}            
        content_info: none
      - type: template
        entity: input_select.ren_lian_ji_he
        tap_action:
          action: call-service
          service: input_select.select_option
          data:
            option: 测试
          target:
            entity_id: input_select.ren_lian_ji_he
        icon: mdi:numeric-4
        icon_color: |
          {% if is_state(entity, '测试') %}
            orange      
          {% else %}  
            grey
          {% endif %}            
        content_info: none
    alignment: justify
    card_mod:
      style: |
        ha-card {
          margin-top: 14px;
          margin-right: 12px;
          --chip-background: rgba(var(--rgb-disabled), 0.2);
          --chip-box-shadow: none;
        }      


回复

使用道具 举报

16

主题

103

帖子

619

积分

高级会员

Rank: 4

积分
619
金钱
516
HASS币
0
 楼主| 发表于 2024-2-21 17:10:39 | 显示全部楼层
搞定了,原来是stack-in-card有bug
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-13 07:32 , Processed in 0.209966 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表