本帖最后由 hungheo 于 2025-1-30 21:44 编辑
type: custom:button-card
entity: sun.sun
show-state: false
show_name: true
show_label: true
show_icon: true
name: 客厅
icon: mdi:home
label: "[[[return states['sensor.a4c1387d255a_temperature'].state + '°C']]]"
styles:
card:
- background: ""
- width: 240px
- height: 120px
- border-color: rgba(255, 255, 255, 0.3)
grid:
- grid-template-areas: |
"i n"
"i l"
- grid-template-rows: min-content min-content;
- grid-template-columns: 20% 30%
icon:
- width: 80px
- height: 80px
name:
- justify-self: start
- margin-left: 10px
- margin-top: "-2px"
label:
- color: blue
- margin-left: 10px
- justify-self: start
tap_action:
action: navigate
navigation_path: /salution-ui/bangongqu
state:
- value: "on"
color: orange
styles:
card:
- background: rgba(255, 255, 255, 0.7)
entity,label里面的温度实体ID替换成自己的 |