智能家居home assistant

mtain 2024年04月28日 197次浏览

一、简介

https://www.home-assistant.io/installation/

二、插件

1. hacs

https://hacs.xyz/docs/setup/download

命令行安装

wget -O - https://get.hacs.xyz | bash -

image.png
image.png
image.png

三、配置

1. 添加http接口的开关

使用command_line,文档:https://www.home-assistant.io/integrations/command_line

configuration.yaml中添加

command_line:
    - switch:
        name: 开关01
        command_on: /usr/bin/curl -X GET  "http://192.168.66.20:5000/open"
        command_off: /usr/bin/curl -X GET "http://192.168.66.20:5000/close"
        

image.png

重启
image.png

按实体添加按钮
image.png