只是更改为extack_ratio:1/1
对于按钮,所有人看起来都不错。
将看到我妻子回到家时对经过修订的外观的反应。
[编辑:妻子似乎并没有大惊小怪,所以这是一场胜利!]
公平地说,由于某种原因,我的配置中实际上并不是1/1的1/1宽高比,但它更好地使用了空间,因此我实际上不介意。
无论哪种方式,我现在都采用了我的主要遥控器,并用模板对其进行了更新,并从2500行YAML的噩梦变成了更易于管理的608行。我仍然喜欢该按钮的特定高度/宽度,因为我喜欢它具有固定尺寸。再次感谢@romrider。
最后一件事要添加与整理卡有关的一件事:
只是尝试了一下,很高兴地报告您可以与Button_card模板一起使用“自定义:button-card”的button_card模板。
我有基于模板的所有内容(现在)的标准按钮,然后使用整理卡来进一步简化配置,通过将button_card_template嵌套在AVR命令的整理卡配置中。如果我想更改现在更改的标准按钮,则位于一个地方。
decluttering_templates: arb_avr_picture_only: entity_picture: '[[entity-picture]]' entity: rest_command.avr_buttons template: rb_picture_only type: 'custom:button-card' tap_action: action: call-service service: rest_command.avr_buttons service_data: command: [[avr_command]]
按钮卡模板:
buttom_card_templates: rb_picture_only: show_entity_picture: true show_name: false styles: card: - padding: 0px 0px - border-radius: 15px - height: 76px - width: 76px - margin: 5px 5px 0px 0px - '--paper-card-background-颜色':白色 - 盒子阴影:'0px 0px 10px 3px RGBA(100,189,54)'entity_picture: - 宽度:70px
按钮配置:
- 类型:'custom:deckuttering-card'模板:rb_avr_picture_only变量: - entity-picture:/local/img/radio-nz-logo.png- avr_command:tpana8