Home Assistant 凭证(Home Assistant credentials)#
你可以使用以下凭据验证以下节点:
🌐 You can use these credentials to authenticate the following nodes:
支持的身份验证方法(Supported authentication methods)#
- API 访问令牌
相关资源(Related resources)#
有关该服务的更多信息,请参阅Home Assistant 的 API 文档。
🌐 Refer to Home Assistant's API documentation for more information about the service.
使用 API 访问令牌(Using API access token)#
要配置此凭据,你需要安装 Home Assistant,创建一个Home Assistant 账户,并具备:
🌐 To configure this credential, you'll need to Install Home Assistant, create a Home Assistant account, and have:
- 你的主持人
- 港口
- 长期有效的 访问令牌
要生成访问令牌并设置凭据:
🌐 To generate an access token and set up the credential:
- 要生成你的 访问令牌,请登录 Home Assistant 并打开你的用户资料。
- 在长期有效访问令牌部分,生成一个新的令牌。
- 复制此令牌并将其作为你的访问令牌输入到 n8n 中。
- 输入你的 Home Assistant 主机 的 URL 或 IP 地址,不包括
http://或https://协议,例如your.awesome.home。 - 对于 端口,请输入相应的端口:
- 如果你没有更改端口,并且通过
http://访问 Home Assistant,请保持默认的8123。 - 如果你没有更改端口,并且通过
https://访问 Home Assistant,请输入443。 - 如果你已将 Home Assistant 配置为使用特定端口,请输入该端口。
- 如果你没有更改端口,并且通过
- 如果你在 Home Assistant 的 config.yml 映射键 中启用了 SSL,请在 n8n 中打开 SSL 切换。如果不确定,当你使用
https://而不是http://访问 Home Assistant UI 时,最好开启此设置。