Home Assistant最佳实践
# 简介
# 安装
参考:Generic x86-64 - Home Assistant (opens new window)
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /PATH_TO_YOUR_CONFIG:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
environment:
TZ: Asia/Shanghai
访问 http://<host>:8123
# Nginx 反代
默认情况下,使用 nginx 反代 hs 的地址会提示 400: Bad Request ,需要 config/configuration.yaml 添加:
http:
use_x_forwarded_for: true
trusted_proxies:
- XXX.XXX.XXX.XXX # Add the IP address of the proxy server
# 开始
按提示下一步即可
# 安装 HACS
全称:Home Assistant Community Store(Home Assistant 社区商店) 参考:HACS (opens new window)
# 容器安装
# 进入Home Assistant容器
docker exec -it <name of the container running homeassistant> bash
# 安装
wget -O - https://get.hacs.xyz | bash -
exit
# 重启容器
docker compose restart
# 集成
- 设置 - 设备与服务
- 右下角 -
添加集成 - 搜索
HACS添加(需登录 Github)
# 社区插件
在侧边栏 HACS 搜索
# 接入
# 海尔
参考:banto6/haier: 海尔智能家居设备接入 HomeAssistant (opens new window)
- 安装:参考 Github
- 抓包:最新海尔小程序抓包教程 - 『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz! (opens new window)
- 配置:设置 - 设备与服务 - 集成 - 添加集成 - 搜索
haier
# 美的
# Apple HomeKit(家庭)
参考:HomeKit Bridge - 家庭助手 --- HomeKit Bridge - Home Assistant (opens new window)
- iOS 设备需安装
家庭 - 集成安装:略
上次更新: 2026/07/01, 13:55:06