你是用button-card卡片的话 下面配置可以修改图标 卡片 名称 状态颜色 大小 圆角
icon: >
[[[ return (entity.state === 'on' || entity.state === 'home') ?
'mdi:lightbulb-on' : 'mdi:lightbulb'; ]]]
hold_action:
repeat: 800
action: more-info
haptic: selection
tap_action:
action: toggle
haptic: homeassistant
styles:
icon:
- width: 2vw
- top: 0%
- color: >
[[[ return (entity.state === 'on' || entity.state === 'home') ?
'rgba(255, 255, 255, 1)' : 'rgba(47, 47, 47, 1)'; ]]]
card:
- width: 18.7vw
- height: 7vw
- background-size: 110% 100%
- background-image: >
[[[ return (entity.state === 'on' || entity.state === 'home') ?
'url("/local/image/light_1_1.png")' :
'url("/local/image/light_2_1.png")'; ]]]
- opacity: 1
- borderRadius: 2vw
name:
- font-weight: bold
- font-size: 15px
- padding-bottom: 6px
- color: >
[[[ return (entity.state === 'on' || entity.state === 'home') ?
'rgba(255, 255, 255, 1)' : 'rgba(56, 56, 56, 1.0)'; ]]]
你用card_mod 写
rgba(255, 255, 255, 1)或者#000000 不行?
|