Home Assistant Docker安装 & HACS安装

容器
20231215163745

一、Home Assistant安装

两种方式,选一即可

(1)Docker运行Home Assistant容器

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=MY_TIME_ZONE \
  -v /PATH_TO_YOUR_CONFIG:/config \
  -v /run/dbus:/run/dbus:ro \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

(2)Docker-compose运行

docker-compose.yml文件:

version: '3'
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

运行容器:

docker compose up -d

二、Web管理

http://<host>:8123

Home Assistant preparation

三、HACS安装

Github项目地址:https://github.com/hacs/integration/releases

网盘地址:https://cloud.orcy.net.cn:5002/s/gRHAY3tAStPSiiP

在/PATH_TO_YOUR_CONFIG下创建custom_components和www文件夹,将hacs解压后上传到/PATH_TO_YOUR_CONFIG/custom_components文件夹下

├── custom_components
│   ├── hacs
│   │   ├── base.py
│   │   ├── config_flow.py
│   │   ├── const.py
│   │   ├── data_client.py
│   │   ├── diagnostics.py
│   │   ├── entity.py
│   │   ├── enums.py
│   │   ├── exceptions.py
│   │   ├── frontend.py
│   │   ├── hacs_frontend

重启Home Assistant

在集成—>添加集成—>搜索 HACS添加即可

20231215163454

版权声明:本文为下一朵云发布文章,转载请附上原文出处链接和本声明。
本文链接:https://www.orcy.net.cn/3854.html

​ 广告:HCIE-Security认证课程辅导资料(付费)

暂无评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注