MQTT 事件流
mqtt_eventstream
integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] 通过 MQTT 连接两个 Home Assistant 实例。
配置
要将 MQTT 事件流集成到 Home Assistant 中,请在您的 configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件中添加以下部分。
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。
# 示例 configuration.yaml 条目
mqtt_eventstream:
publish_topic: MyServerName
subscribe_topic: OtherHaServerName
Configuration Variables
不会通过 MQTT 发送的 事件 列表。
多个实例
通过从父实例订阅一个通配符主题,可以将来自多个实例的事件聚合到一个单一的父实例。
# 示例父实例 configuration.yaml 条目
mqtt_eventstream:
publish_topic: parent/topic
subscribe_topic: child/#
ignore_event:
- call_service
- state_changed
对于多实例设置,每个子实例都会发布到各自的主题。
# 示例子实例 configuration.yaml 条目
mqtt_eventstream:
publish_topic: child/upstairs
subscribe_topic: parent/topic
# 示例子实例 configuration.yaml 条目
mqtt_eventstream:
publish_topic: child/downstairs
subscribe_topic: parent/topic