在@dscao 大佬的改的基础上做了一点小小的修改,把原来的星期显示改为了时辰显示,代码如下
type: custom:config-template-card
entities:
- sensor.nong_li
card:
type: custom:button-card
show_icon: true
show_state: false
show_name: false
styles:
grid:
- grid-template-areas: ' "a b f g g" "a c h i i" "a d j k k" "a e l m n" "o p p p p" "q r r r r" "s t t t t" "u v v v v" "w x x x x" "y z z z z"'
- grid-template-columns: 70px 20px 1fr 1fr 1fr
- grid-template-rows: 75px 75px 75px 75px 75px 1fr 1fr 1fr 1fr 1fr
card:
- padding: 10px
custom_fields:
a:
card:
type: custom:button-card
entity: sensor.nong_li
show_icon: false
show_name: false
show_state: true
show_label: false
styles:
grid:
- height: 320px
card:
- background: none
- border: none
- box-shadow: none
state:
- writing-mode: vertical-lr
- font-weight: bold
- font-size: 30px
- letter-spacing: 10px
b:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.tian_gan_nian}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- margin-top: 10px
- background: none
- border: none
- box-shadow: none
name:
- writing-mode: vertical-lr
- font-weight: lighter
- font-size: 12px
- letter-spacing: 6px
c:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.tian_gan_yue}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- margin-top: 10px
- background: none
- border: none
- box-shadow: none
name:
- writing-mode: vertical-lr
- font-weight: lighter
- font-size: 12px
- letter-spacing: 6px
d:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.tian_gan_ri}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- margin-top: 10px
- background: none
- border: none
- box-shadow: none
name:
- writing-mode: vertical-lr
- font-weight: lighter
- font-size: 12px
- letter-spacing: 6px
e:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.shi_chen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- margin-top: 10px
- background: none
- border: none
- box-shadow: none
name:
- writing-mode: vertical-lr
- font-weight: lighter
- font-size: 12px
- letter-spacing: 6px
f:
card:
type: custom:button-card
name: 五行
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 18px
- letter-spacing: 3px
g:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.wu_xing}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 10%
- font-weight: lighter
- justify-self: start
- font-size: 15px
- letter-spacing: 1px
h:
card:
type: custom:button-card
name: 冲煞
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 18px
- letter-spacing: 3px
i:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.chong_sha}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 10%
- font-weight: lighter
- justify-self: start
- font-size: 15px
- letter-spacing: 1px
j:
card:
type: custom:button-card
name: 彭祖
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 18px
- letter-spacing: 3px
k:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.peng_zu_gan}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 10%
- font-weight: lighter
- justify-self: start
- font-size: 15px
- letter-spacing: 1px
l:
card:
type: custom:button-card
name: ${'喜神:'+states['sensor.nong_li'].attributes.xi_shen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- font-size: 14px
- font-weight: bold
- letter-spacing: 1px
state:
- font-weight: lighter
- font-size: 14px
- letter-spacing: 3px
m:
card:
type: custom:button-card
name: ${'福神:'+states['sensor.nong_li'].attributes.fu_shen}
show_icon: false
show_name: true
show_state: false
show_label: true
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- font-size: 14px
- font-weight: bold
- letter-spacing: 1px
state:
- font-weight: lighter
- font-size: 14px
- letter-spacing: 3px
'n':
card:
type: custom:button-card
name: ${'财神:'+states['sensor.nong_li'].attributes.cai_shen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- font-size: 14px
- font-weight: bold
- letter-spacing: 1px
state:
- font-weight: lighter
- font-size: 14px
- letter-spacing: 3px
o:
card:
type: custom:button-card
name: 宜
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 25px
- color: green
p:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.yi}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
- white-space: normal
q:
card:
type: custom:button-card
name: 忌
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 25px
- color: red
r:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.ji}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
- white-space: normal
s:
card:
type: custom:button-card
name: 八字
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 18px
t:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.ba_zi}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
u:
card:
type: custom:button-card
name: 胎神
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 18px
v:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.tai_shen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
w:
card:
type: custom:button-card
name: 吉神
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 20px
x:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.ji_shen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
- white-space: normal
'y':
card:
type: custom:button-card
name: 凶神
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- justify-self: end
- font-weight: bold
- font-size: 20px
z:
card:
type: custom:button-card
name: ${states['sensor.nong_li'].attributes.xiong_shen}
show_icon: false
show_name: true
show_state: false
show_label: false
styles:
grid: null
card:
- background: none
- border: none
- box-shadow: none
name:
- margin-left: 15px
- font-weight: lighter
- justify-self: start
- font-size: 13px
- letter-spacing: 3px
- white-space: normal
复制代码
flows.json
(11.31 KB, 下载次数: 22)