我不知道这是在这里还是在按钮卡中?这篇文章中有很多代码,所以请忍受我。这是同一件事的两个版本。一个使用按钮卡进行工作,另一个不使用缝制模板。(我很久以前就从别人那里偷了这个想法,但不记得谁)。
所以…
这可以在侧面给出带有“设置”按钮的漂亮标头:
![图片](//www.sz-tiancheng.com/community-assets/original/3X/9/c/9c1f0ddfbe514c52407fe8ac19a2007d4ac70302.png)
卡: - 类型:垂直堆栈卡片: - 类型:水平堆栈卡片: - 类型:自定义:按钮卡标签:“ - hall - ” show_name:false show_icon:false show_icon:false show_label:true样式:card: - 高度: - 高度: - 高度:50px# - 背景:线性级别(右,RGBA(255,255,20,0.45)0%,RGBA(255,255,20,0.3)60%,RGBA,RGBA(255,255,20,0)85%) - 背景:线性:线性:线性:- 级别(右,var( - 纸卡 - 背景颜色)0%,RGBA(255,255,255,0.55)70%,RGBA(255,255,255,0)90%) - -HA-Card-card-boxshadow:'none'标签: - 正当自我:开始 - 填充 - 左:10px -font -size:18pt-类型:自定义:button -card color_type:空白卡样式:卡片: - width: - width:2px-类型:custom:custom:button:button:button:button:button:button:button:button:tustn-CARD图标:MDI:设置show_name:false tap_action:操作:呼叫服务服务:homeassistant.turn_on service_data:entity_id:entity_id:entity styletity styles:card:card border -radius:50% - 高度 - 高度:40px-宽度:40px - 背景:rgba:rgba:rgba:rgba:rgba(255,255,255,0.45) - 顶部:5px图标: - 颜色:灰色 - 宽度:35px-类型:自定义:button -card color_type:空白卡样式:卡片: - 宽度: - 宽度:2p:2p:2pX-类型:自定义:横幅卡背景:“#ede7b0”标题:“ \ u0001f6cb hall”链接: /lovelace /0 Entities: - entity:group.hall_lights name name:lightd name:birone_sensor- entity:binary_sensor.front_door name -entity -entity -entity -entity -entity -entity -entity -entity -entity -entity -entity-:sensor.hall_temperature名称:温度
但这是不起作用的,使用了整理模板:
![图片](//www.sz-tiancheng.com/community-assets/original/3X/c/5/c5a82b45bd3c637cab21822874c3b019200cdd7e.png)
首先是视图本身,
卡: - 类型:垂直堆栈卡片: - 类型:水平堆栈卡片: - 类型:自定义:Deckuttering卡模板:Simple_header变量: - 标签: - 霍尔 - - - - 类型:custom:custom:button -card color_type:black:blank-CARD样式:卡: - 宽度:2PX-类型:自定义:Deckuttering卡模板:Simple_header_options_button-类型:自定义:button -card color_type:空白卡样式:卡片: - 宽度: - 宽度:2px:2px
然后解散模板,
#===============================================自定义:按钮卡标签:'[[label]]'show_label:true exchap_ratio:9/1#color_type:label-card styles:card:card: - 高度:50px-背景:linear-grackgradient:linear-gradient(右)( - 右,var( -纸卡背景颜色)0%,RGBA(255,255,255,0.55)60%,RGBA(255,255,255,0)90%)90%) - ha-card-box-box-shadow:'none'# - 背景色:var:var:var( - Paper-card-background-color)标签: - 正当形式:start-padding-left:20px-font-size:24px#====================================================================简单的标头选项按钮#============================================================== simple_header_options_button:默认值:图标:mdi:设置锁定:false lock_color:var( - primary-text-color)tap_action:more-info card:type:type:styper:study:study card-card iCON:']]'show_name:false tap_action:action:'[[tap_action]]'锁:'[[lock]]'样式:卡片: - border -radius:50% - 高度:50px-宽度 - 宽度:50px-背景:RGBA:RGBA(255,255,255,0.45)锁: - 颜色:'[[lock_color]]'图标: - 颜色:灰色 - 宽度:35px
对于奖励积分,为什么当默认值为“ false”时,选项按钮将具有锁定?