docs: 更新 README 安装和更新说明

- 添加本地部署方式(开发/测试推荐)
- 添加 HACS 安装方式
- 添加手动安装方式(生产环境)
- 添加 Git 更新流程说明

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
impressionyang 2026-04-15 18:31:11 +08:00
parent db02581f5c
commit f7b4c60af2

View File

@ -27,23 +27,63 @@
## 安装
### 通过 HACS 安装(推荐)
### 方式一:本地部署(开发/测试推荐)
**快速部署命令**:
```bash
# 克隆或进入项目目录
cd /path/to/impress_sig_mesh_hacs
# 复制到 Home Assistant 配置目录
cp -r custom_components/sigmesh_gateway ~/.homeassistant/custom_components/
# 重启 Home Assistant
ha core restart
```
**部署脚本**(如已创建 `deploy.sh`:
```bash
chmod +x deploy.sh
./deploy.sh
```
### 方式二:通过 HACS 安装
**前提**: 需要将代码发布到 Git 仓库并创建 Release
1. 打开 HACS
2. 点击 "Integrations"
3. 点击右上角菜单 → "Custom repositories"
4. 添加仓库:`https://github.com/impress-sig-mesh/sigmesh_gateway`
4. 添加仓库:`http://192.168.124.9:33001/impressionyang/impress_sig_mesh_hacs`
5. 选择类别:`Integration`
6. 点击 "Add"
7. 找到 "SigMesh Gateway" 并点击 "Download"
8. 重启 Home Assistant
### 手动安装
### 方式三:手动安装(生产环境)
1. 下载最新版本的 `sigmesh_gateway.zip`
2. 解压到 `config/custom_components/sigmesh_gateway/`
1. 从 Releases 页面下载最新版本的 `sigmesh_gateway.zip`
2. 解压到 `<HA 配置目录>/custom_components/sigmesh_gateway/`
3. 重启 Home Assistant
---
## 更新
**从 Git 拉取最新代码并部署**:
```bash
cd /path/to/impress_sig_mesh_hacs
# 拉取最新代码
git pull origin main
# 重新部署
cp -r custom_components/sigmesh_gateway ~/.homeassistant/custom_components/
# 重启 Home Assistant
ha core restart
```
## 配置
### UI 配置(推荐)