Commit Graph

15 Commits

Author SHA1 Message Date
impressionyang
e88ddae6ca docs: 更新问题修复记录 - 添加第二次修复
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:48:31 +08:00
impressionyang
311cfbbe7e fix: 修复平台文件和 OptionsFlow 错误
修复内容:
1. 所有平台文件添加 coordinator.data None 检查
   - sensor.py, binary_sensor.py, switch.py, light.py, device_tracker.py
2. 修复 async_get_options_flow 签名
   - 改为实例方法,移除 config_entry 参数
   - 移除 @staticmethod 装饰器
3. OptionsFlow 添加正确的 __init__ 方法

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:48:00 +08:00
impressionyang
28e9800cae docs: 更新问题修复记录 - 添加平台加载错误修复
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:40:05 +08:00
impressionyang
19774a4a9f fix: 修复平台加载和 OptionsFlow 错误
主要修复:
1. 将平台文件从 platforms/ 移到集成根目录
   - sensor.py, binary_sensor.py, switch.py, light.py, device_tracker.py
2. 修复 OptionsFlow config_entry 属性错误
   - 移除手动设置的 config_entry
3. 添加集成图标 icons/icon.png
4. manifest.json 添加 integration_type: device

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:39:35 +08:00
impressionyang
acd23e6f64 docs: 添加项目图标
- 添加 .asset/impress_sig_mesh_hacs.png 作为 HACS 集成图标
- 在 hacs.json 中配置 icon 字段
- 在 README.md 顶部显示图标
- 更新 .gitignore 仅保留图标文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 22:50:10 +08:00
impressionyang
9637c7f39d docs: 更新问题修复记录 - 添加导入错误修复
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:10:28 +08:00
impressionyang
472fec4a70 fix: 修复 coordinator.py 导入错误
问题:MeshMessageEvent 和 ProvDeviceEvent 定义在 serial_reader.py
但 coordinator.py 错误地从 protocol_parser.py 导入

修复:
- 从 protocol_parser 导入移除这两个类
- 改为从 serial_reader 导入
- 移除 _setup_callbacks 中多余的内部导入

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:09:40 +08:00
impressionyang
09bf82da9a docs: 添加问题修复记录
记录 2026-04-15 配置向导 500 错误的修复过程

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:03:59 +08:00
impressionyang
e905410ed7 fix: 修复 manifest.json 依赖错误
问题:bleak-mesh 包不存在导致 500 错误
解决:
- 移除不存在的 bleak-mesh 依赖
- 使用 pyserial-asyncio-fast 替代 pyserial-asyncio(HA 推荐)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:03:15 +08:00
impressionyang
66b86e3b74 fix: 修复 config_flow.py 类型注解错误
- 将 dict[str, any] 改为 dict[str, Any]
- 添加 typing.Any 导入

这会导致 500 Internal Server Error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:49:18 +08:00
impressionyang
d58bf08472 docs: 添加调试信息收集指南
用于排查配置向导 500 错误,包含:
- 日志收集方法
- Python 语法检查
- 依赖验证
- 常见问题解决方案
- 快速诊断脚本

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:43:35 +08:00
impressionyang
f7b4c60af2 docs: 更新 README 安装和更新说明
- 添加本地部署方式(开发/测试推荐)
- 添加 HACS 安装方式
- 添加手动安装方式(生产环境)
- 添加 Git 更新流程说明

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:31:11 +08:00
impressionyang
db02581f5c docs: 添加部署指南文档
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:27:39 +08:00
impressionyang
79e39c28c9 更新:完善 .gitignore 文件
根据 HACS 项目规范添加:
- HACS 特定文件(RELEASE.md, changelog.md, .hacs/)
- 测试相关文件(.pytest_cache/, .coverage, htmlcov/)
- 敏感信息(*.pem, *.key, *.crt, .env)
- 临时文件和备份文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:22:44 +08:00
impressionyang
6a66c9b474 初始提交:SigMesh Gateway HACS 集成
项目结构:
- custom_components/sigmesh_gateway/ - Home Assistant 集成
  - serial_reader.py - 串口读取器
  - protocol_parser.py - 协议解析器
  - coordinator.py - 数据协调器
  - platforms/ - 传感器/开关/灯光/设备追踪实体

文档:
- PRD.md - 产品需求文档
- README.md - 用户使用指南
- 可行性分析.md - 技术可行性分析
- 参数配置表.md - 配置参数记录
- 调试检查清单.md - 问题排查指南

功能特性:
- 串口通信 (115200 波特率)
- Bluetooth Mesh 协议解析
- 支持 200+ 设备接入
- UI 配置界面
- 多平台实体支持

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:20:48 +08:00