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>
This commit is contained in:
impressionyang 2026-04-16 09:39:35 +08:00
parent acd23e6f64
commit 19774a4a9f
8 changed files with 3 additions and 5 deletions

View File

@ -77,10 +77,6 @@ class SigMeshGatewayConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
class SigMeshGatewayOptionsFlow(config_entries.OptionsFlow):
"""SigMesh Gateway 选项流程."""
def __init__(self, config_entry: config_entries.ConfigEntry) -> None:
"""初始化选项流程."""
self.config_entry = config_entry
async def async_step_init(self, user_input: dict[str, Any] | None = None) -> FlowResult:
"""管理选项."""
if user_input is not None:

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -9,5 +9,7 @@
"requirements": ["pyserial-asyncio-fast>=0.6"],
"config_flow": true,
"iot_class": "local_push",
"loggers": ["sigmesh_gateway"]
"loggers": ["sigmesh_gateway"],
"quality_scale": "internal",
"integration_type": "device"
}