将设备添加到Home Assistant
https://www.home-assistant.io/docs/configuration/devices/
configuration.yaml
文件
风格1:在原有的条目下增加
sensor:
- platform: mqtt
state_topic: "home/bedroom/temperature"
name: "MQTT Sensor 1"
- platform: mqtt
state_topic: "home/kitchen/temperature"
name: "MQTT Sensor 2"
- platform: rest
resource: http://IP_ADDRESS/ENDPOINT switch:
- platform: vera
风格2:单独列出每个设备
您需要附加数字或字符串以区分条目,如下例所示。附加的数字或字符串必须是唯一的。
media_player livingroom:
platform: mpd
server: IP_ADDRESS media_player kitchen:
platform: plex camera 1:
platform: generic camera 2:
platform: mjpeg
分组设备
设置好多个设备后,就可以将它们组织成组了。每个组由一个名称和一个实体ID列表组成。可以使用Developer Tools()中的Set State页面从Web界面检索实体ID 。
# Example configuration.yaml entry showing two styles
group:
living_room:
entities: light.table_lamp, switch.ac
bedroom:
entities:
- light.bedroom
- media_player.nexus_player