Home Assistant界面优化必装插件fold-entity-row安装与使用指南【免费下载链接】lovelace-fold-entity-row A foldable row for entities card, containing other rows项目地址: https://gitcode.com/gh_mirrors/lo/lovelace-fold-entity-rowfold-entity-row是一款专为Home Assistant设计的界面优化插件它能够帮助用户在lovelace entities卡片中折叠和隐藏行让界面更加整洁有序。本文将为你详细介绍fold-entity-row的安装方法和使用技巧让你轻松打造个性化的Home Assistant控制面板。为什么选择fold-entity-row在使用Home Assistant的过程中随着设备和实体的增多entities卡片往往会变得冗长杂乱难以快速找到需要的控制项。fold-entity-row的出现解决了这一问题它允许你将相关的实体行进行折叠只在需要时展开查看极大地提升了界面的可读性和操作效率。图fold-entity-row折叠与展开状态对比左侧为折叠状态右侧为展开状态快速安装fold-entity-row通过HACS安装推荐HACSHome Assistant Community Store是Home Assistant的社区商店提供了便捷的插件管理功能。如果你已经安装了HACS可以按照以下步骤安装fold-entity-row打开Home Assistant的Web界面进入HACS点击左侧导航栏的“插件”选项点击右下角的“”按钮搜索“fold-entity-row”找到对应的插件后点击“安装”按钮安装完成后重启Home Assistant手动安装如果你没有使用HACS可以通过手动方式安装克隆仓库git clone https://gitcode.com/gh_mirrors/lo/lovelace-fold-entity-row将克隆得到的fold-entity-row.js文件复制到Home Assistant的www/custom-lovelace/fold-entity-row/目录下在Home Assistant的lovelace配置中添加资源resources: - url: /local/custom-lovelace/fold-entity-row/fold-entity-row.js type: module重启Home Assistant基础使用方法fold-entity-row的使用非常简单只需在entities卡片中添加相应的配置即可。基本折叠行配置type: entities entities: - light.bed_light - type: custom:fold-entity-row head: light.bed_light entities: - light.bed_light - light.ceiling_lights - light.kitchen_lights在这个例子中我们创建了一个折叠行头部为light.bed_light实体点击头部的箭头图标可以展开或折叠包含的实体行。自定义头部样式你可以像自定义普通entities卡片行一样自定义折叠行的头部type: entities entities: - type: custom:fold-entity-row head: type: section label: 灯光控制 entities: - light.bed_light - entity: light.ceiling_lights name: 天花板灯 - light.kitchen_lights这里我们使用了section类型作为头部并设置了标签为“灯光控制”使界面更加清晰。高级功能与技巧应用组配置通过group_config选项你可以为折叠行中的所有实体应用相同的配置type: entities entities: - type: custom:fold-entity-row head: type: section label: 所有灯光 group_config: secondary_info: last-changed icon: mdi:lamp entities: - light.bed_light - light.ceiling_lights - light.kitchen_lights这个配置会为折叠行中的所有灯光实体添加“最后更改时间”的次要信息并统一使用“mdi:lamp”图标。默认展开状态设置open: true可以让折叠行默认处于展开状态type: entities entities: - type: custom:fold-entity-row head: type: section label: 常用设备 open: true entities: - light.bed_light - switch.living_room_tv - climate.thermostat嵌套折叠fold-entity-row支持嵌套使用你可以在一个折叠行中包含另一个折叠行type: entities entities: - type: custom:fold-entity-row head: type: section label: 房间控制 entities: - type: custom:fold-entity-row head: 卧室 entities: - light.bed_light - climate.bedroom - type: custom:fold-entity-row head: 客厅 entities: - light.living_room - switch.tv常见问题解答fold-entity-row可以在哪些卡片中使用fold-entity-row只能在entities卡片中使用不能在其他类型的卡片中单独使用。如何调整折叠行的缩进距离可以通过padding参数调整折叠行的左侧缩进距离单位为像素type: entities entities: - type: custom:fold-entity-row head: type: section label: 缩进示例 padding: 10 entities: - light.bed_light能否将折叠行与自动实体卡片结合使用可以你可以使用auto-entities等插件来自动填充折叠行中的实体type: entities entities: - type: custom:auto-entities filter: include: - domain: sensor card: type: custom:fold-entity-row head: type: section label: 所有传感器总结fold-entity-row是一款简单而强大的Home Assistant界面优化插件它能够帮助你有效地组织和管理entities卡片中的实体行让你的控制面板更加整洁、易用。通过本文介绍的安装方法和使用技巧相信你已经能够轻松上手fold-entity-row并打造出更加个性化的Home Assistant界面。如果你想查看更多使用示例可以参考项目中的test/views目录那里包含了各种场景的测试用例。【免费下载链接】lovelace-fold-entity-row A foldable row for entities card, containing other rows项目地址: https://gitcode.com/gh_mirrors/lo/lovelace-fold-entity-row创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考