跳转到内容

Home Assistant 开关

homeassistant 开关平台允许您创建通过原生 API从 Home Assistant 实例导入状态并允许控制的开关。

NOTE

虽然您可能不打算从节点导出状态,也不需要在 Home Assistant 中有节点的实体,但此组件仍然需要您在 Home Assistant 下注册节点。请参阅: 将您的设备连接到 Home Assistant

# 示例配置条目
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