测试的大概效果
type: entities
entities:
- entity: number.mao_xiao_bei_set_weight
name: 设置重量
card_mod:
style: |
hui-generic-entity-row > div {
background: linear-gradient(45deg, #ff6b6b, #ffd93d);
}
ha-textfield {
--mdc-text-field-fill-color: rgba(255,255,255,0.1);
--mdc-text-field-label-ink-color: #ffffff;
}
:host {
color: rgba(3, 30, 300, 1);
}
title: 猫小贝
state_color: true
card_mod:
style: |
ha-card {
background-image: url("/local/backgrounds/test cat.jpg");
#background: rgba(0, 0, 0, 0.3); /* 半透明白色背景 */
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
border: 1px solid rgba(255, 255, 255, 0.2); /* 可选:边框增强层次感 */
}
ha-textfield {
background: rgba(255, 255, 0, 0.3);
}
|