从手动开关到智能联动
你是否还在摸黑找开关?今天我们来搭建一个基于 Home Assistant 的自动化灯光系统。
核心配置代码
automation:
- alias: "客厅有人自动开灯"
trigger:
platform: state
entity_id: binary_sensor.living_room_motion
to: "on"
action:
- service: light.turn_on
entity_id: light.living_room
传感器对比
| 特性 | 人体传感器 | 存在传感器 |
|---|---|---|
| 检测原理 | 红外热释电 | 毫米波雷达 |
| 静止检测 | ❌ | ✅ |
| 价格 | 50-150 元 | 200-500 元 |
智能家居的核心不是能手机控制,而是无需控制。

