本帖最后由 hungheo 于 2025-1-12 17:12 编辑
正确的代码是这样的:
type: thermostat
entity: climate.qdhkl_ac_0103_air_conditioner
card_mod:
style:
ha-state-control-climate-temperature $: |
/* 隐藏顶部状态(开关状态) */
[class="label"] {
display: none !important;
}
/* 隐藏底部温度(包括字体和图标) */
[class="label secondary"] {
font-size: 0px !important;
display: unset !important;
}
[class="label secondary"] ha-svg-icon {
display: none !important; /* 隐藏底部温度旁边的图标 */
}
[class="label secondary"]::after {
content: ''; /* 清空底部温度显示内容 */
font-size: 0px; /* 确保内容不占空间 */
}
.: |
ha-card>ha-icon-button {
display:none !important
}
也可以简写成这样:
card_mod:
style:
ha-state-control-climate-temperature $: |
.label {
display: none !important;
}
.label secondary {
font-size: 0px !important;
display: unset !important;
}
.ha-svg-icon {
display: none !important;
}
.: |
ha-icon-button {
display: none !important;
}
|