From 9c71db2807e1b6cfd48e3a95d6a0da9b8d89d0f5 Mon Sep 17 00:00:00 2001 From: impressionyang Date: Thu, 16 Apr 2026 09:55:38 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 callback 导入缺失错误的修复记录 --- 问题修复记录.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/问题修复记录.md b/问题修复记录.md index 511882a..b2bf1cf 100644 --- a/问题修复记录.md +++ b/问题修复记录.md @@ -1,5 +1,39 @@ # 问题修复记录 +## 2026-04-16: 修复 callback 导入缺失错误 + +### 问题描述 +配置集成时出现 `"Invalid handler specified"` 错误 + +### 错误日志 + +#### 错误:配置流程无法加载 +``` +无法加载配置向导:{"message":"Invalid handler specified"} +``` + +**原因**: `config_flow.py` 中使用了 `@callback` 装饰器但没有导入 + +### 解决方案 + +#### 修复:添加 callback 导入 +```python +from homeassistant.core import callback +``` + +### 提交记录 +| Commit | 说明 | +|--------|------| +| 4031747 | fix: 添加缺失的 callback 导入 | + +### 部署步骤 +```bash +cp -r custom_components/sigmesh_gateway ~/.homeassistant/custom_components/ +ha core restart +``` + +--- + ## 2026-04-16: 修复平台加载和 OptionsFlow 错误(第二次修复) ### 问题描述