求教,button-card里面,如果实现点击图标的是时候执行开/关灯,点图标以外的区域,执行更多动作呢。以下是我卡片的代码。
type: custom:button-card
entity: light.chuangtoudengbei
show_icon: true
show_state: true
show_name: true
styles:
grid:
- grid-template-areas: |
"i n"
"i s"
- grid-template-rows: 1fr min-content
- grid-template-columns: min-content 1fr;
card:
- padding: 8px
img_cell:
- width: 40px
- height: 40px
- background: rgba(139,195,74,0.2)
- border-radius: 50%
- margin-right: 8px
icon:
- width: 24px
- height: 24px
- color: var(--green-color)
name:
- justify-self: flex-start
- font-size: 14px
- font-weight: 600
state:
- justify-self: flex-start
- font-size: 12px
|