Home Assistant房间摘要卡片(Room Summary Card)配置详解
2025-06-20 08:12:25作者:何将鹤
项目概述
Room Summary Card是Home Assistant平台上一款功能强大的自定义卡片组件,专门用于展示房间或区域的智能设备状态摘要。该卡片能够直观地呈现房间内的设备状态、环境传感器数据,并提供美观的视觉布局选项,是构建智能家居控制面板的理想选择。
基础配置
基本房间配置
最简单的配置只需要指定区域ID即可:
type: custom:room-summary-card
area: living_room
这个配置会自动显示客厅(living_room)区域内的所有设备状态。
自定义区域名称
如果你想显示更友好的区域名称,可以使用area_name参数:
type: custom:room-summary-card
area: living_room
area_name: '家庭客厅'
视觉增强配置
背景图片设置
为卡片添加背景图片可以显著提升视觉效果:
type: custom:room-summary-card
area: living_room
background:
image: /local/images/living-room.jpg
opacity: 30
opacity参数控制背景透明度(0-100),数值越小越透明。
动态背景
更高级的用法是使用实体状态作为背景源:
type: custom:room-summary-card
area: bedroom
background:
image_entity: person.john
opacity: 40
这会将"person.john"实体的图片属性作为背景。
设备控制配置
自定义主控实体
你可以指定一个主控实体,通常用于控制房间的主要设备:
type: custom:room-summary-card
area: living_room
entity:
entity_id: light.living_room_main
icon: mdi:ceiling-light
tap_action:
action: toggle
tap_action定义了点击时的动作,这里设置为切换开关状态。
传感器数据展示
展示房间环境传感器数据是常见需求:
type: custom:room-summary-card
area: living_room
sensors:
- sensor.living_room_temperature
- sensor.living_room_humidity
- sensor.living_room_co2
- sensor.living_room_light_level
sensor_layout: bottom
sensor_layout参数控制传感器数据显示位置,可选bottom或right。
高级功能配置
阈值告警
设置环境参数阈值,超出时卡片边框会变色提示:
type: custom:room-summary-card
area: garage
thresholds:
temperature: 85 # 温度超过85°F显示红色边框
humidity: 70 # 湿度超过70%显示蓝色边框
自定义实体列表
默认显示区域内所有实体,但你可以精确控制显示哪些:
type: custom:room-summary-card
area: office
features:
- exclude_default_entities
entities:
- entity_id: light.office_desk
icon: mdi:desk-lamp
- entity_id: switch.office_computer
icon: mdi:desktop-tower
exclude_default_entities特性会禁用自动显示区域实体功能。
问题实体检测
卡片可以自动检测并统计标记为"problem"的问题设备:
- 在Home Assistant中进入设置 → 区域与标签
- 创建或编辑标签
- 为相关实体添加"problem"标签
- 卡片会自动检测并显示问题数量
完整配置示例
type: custom:room-summary-card
area: living_room
area_name: '客厅'
entity:
entity_id: light.living_room_main
icon: mdi:ceiling-light
tap_action:
action: toggle
hold_action:
action: more-info
entities:
- entity_id: switch.living_room_tv
icon: mdi:television
- light.living_room_lamp
- switch.living_room_fan
sensors:
- sensor.living_room_temperature
- sensor.living_room_humidity
- sensor.living_room_co2
sensor_layout: bottom
background:
image: /local/images/living-room.jpg
opacity: 25
thresholds:
temperature: 75
humidity: 55
features:
- hide_area_stats
- hide_sensor_icons
navigate: /lovelace/living-room
样式定制
基础颜色定制
styles:
title:
color: '#4CAF50'
font-weight: bold
entities:
background: blue
stats:
color: '#FFC107'
sensors:
color: '#2196F3'
现代玻璃效果
styles:
card:
background: 'rgba(255, 255, 255, 0.1)'
border: '1px solid rgba(255, 255, 255, 0.2)'
border-radius: 20px
backdrop-filter: 'blur(10px)'
title:
color: '#ffffff'
font-weight: 300
letter-spacing: 2px
stats:
color: 'rgba(255, 255, 255, 0.7)'
sensors:
color: 'rgba(255, 255, 255, 0.8)'
使用建议
- 渐进式配置:从简单配置开始,逐步添加功能
- 合理分组:按房间功能组织实体,保持卡片整洁
- 视觉层次:利用背景和样式突出重要信息
- 响应式设计:在不同设备上测试显示效果
- 性能考虑:避免在卡片中加载过多实体影响性能
Room Summary Card通过灵活的配置选项,能够满足从简单到复杂的各种房间摘要展示需求,是构建智能家居控制中心的理想组件。
登录后查看全文
热门项目推荐
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0130- DDeepSeek-V4-ProDeepSeek-V4-Pro(总参数 1.6 万亿,激活 49B)面向复杂推理和高级编程任务,在代码竞赛、数学推理、Agent 工作流等场景表现优异,性能接近国际前沿闭源模型。Python00
MiMo-V2.5-ProMiMo-V2.5-Pro作为旗舰模型,擅⻓处理复杂Agent任务,单次任务可完成近千次⼯具调⽤与⼗余轮上 下⽂压缩。Python00
GLM-5.1GLM-5.1是智谱迄今最智能的旗舰模型,也是目前全球最强的开源模型。GLM-5.1大大提高了代码能力,在完成长程任务方面提升尤为显著。和此前分钟级交互的模型不同,它能够在一次任务中独立、持续工作超过8小时,期间自主规划、执行、自我进化,最终交付完整的工程级成果。Jinja00
MiniCPM-V-4.6这是 MiniCPM-V 系列有史以来效率与性能平衡最佳的模型。它以仅 1.3B 的参数规模,实现了性能与效率的双重突破,在全球同尺寸模型中登顶,全面超越了阿里 Qwen3.5-0.8B 与谷歌 Gemma4-E2B-it。Jinja00
MiniMax-M2.7MiniMax-M2.7 是我们首个深度参与自身进化过程的模型。M2.7 具备构建复杂智能体应用框架的能力,能够借助智能体团队、复杂技能以及动态工具搜索,完成高度精细的生产力任务。Python00
热门内容推荐
最新内容推荐
项目优选
收起
暂无描述
Dockerfile
723
4.64 K
Ascend Extension for PyTorch
Python
594
748
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
425
375
本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。
C++
991
979
暂无简介
Dart
969
246
Oohos_react_native
React Native鸿蒙化仓库
C++
345
390
Claude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed.
Get Started
Rust
896
130
deepin linux kernel
C
29
16
昇腾LLM分布式训练框架
Python
159
188
🎉 (RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue3 & Vite、Element Plus 的前后端分离权限管理系统
Vue
1.65 K
966