跳转到内容

Home Assistant 开关

homeassistant 开关平台允许你创建一个导入 状态并允许通过 Home Assistant 实例使用 native API 进行控制的开关。

NOTE

虽然你可能不打算从节点导出状态,并且在 Home Assistant 中不需要节点的实体,此组件仍要求你在 Home Assistant 下注册该节点。参见: 将设备连接到 Home Assistant。

# Example configuration entry
switch:
- platform: homeassistant
id: my_cool_switch_from_ha
entity_id: switch.my_cool_switch
  • entity_id(必填,字符串):要从 Home Assistant 导入 / 控制的实体 ID。
  • Switch 中的所有其他选项。

此平台支持来自 Home Assistant 的以下实体域。

  • automation
  • fan
  • humidifier
  • input_boolean
  • light
  • remote
  • siren
  • switch