type: custom:mushroom-template-card
entity: fan.zhimi_cn_271052863_va1_s_2_air_purifier
secondary: ""
picture: |-
{% set status = state_attr(entity,'preset_mode') %}
{%
if status == "最爱" and is_state(entity, 'on') %}
/local/home/icon/red_fan.gif {% elif status == "自动" and is_state(entity, 'on') %}
/local/home/icon/fan.gif {% elif status == "睡眠" and is_state(entity, 'on') %}
/local/home/icon/night_fan.gif {% else %} /local/home/icon/fan_off.png {% endif %}
primary: ""
style:
top: 21%
left: 32.5%
card_mod:
style: |
ha-card {
background: transparent !important;
border: 0px solid #333333 !important;
padding:0px !important;
}
ha-card img{
width: 10px !important;
height: 10px !important;
object-fit: contain !important;
}
请问下各位大佬 上面代码中图片的大小怎么通过ha-card来控制? 蘑菇卡片css选择器是怎么确定的?
|