import type { ModuleConfig } from '@/types/module' import type { SearchIndexItem } from '@/stores/searchIndex' /** * 智能家居模块(Home Assistant 对接)。 * * 规划见 doc/SMART_HOME_MODULE_PLAN.md: * - P0 连接管理(双地址:局域网 / 反代)+ 令牌入系统凭据管理器 + 端点选择 + 链路诊断 * - P1 设备状态列表 P2 设备控制 P3 HA 已有自动化 * - P4 WebSocket 实时推送(含房间分组)+ 本地规则引擎(三段式,仅在 Thing 运行时生效) */ const searchItems: SearchIndexItem[] = [ { title: '智能家居', description: '查看与控制 Home Assistant 中的智能家居设备', keywords: ['智能家居', 'home assistant', 'ha', '设备', '实体', '灯', '开关', 'smarthome'], tab: 'devices' }, { title: '智能家居 · 自动化', description: '查看与运行 Home Assistant 自动化,管理本地联动规则', keywords: ['自动化', 'automation', '场景', 'scene', '脚本', 'script', '联动', '规则'], tab: 'automations' }, { title: '智能家居连接设置', description: '配置 Home Assistant 地址(局域网 / 反代)与长期访问令牌', keywords: ['连接', '令牌', 'token', '地址', '反代', '局域网', 'home assistant', '设置'], tab: 'settings' }, { title: '检测智能家居链路', description: '探测当前使用的是局域网还是反代,并显示耗时', keywords: ['链路', '延迟', '检测', '局域网', '反代', 'cloudflare', 'tunnel', '诊断'], tab: 'settings' } ] export const moduleConfig: ModuleConfig = { id: 'smarthome', name: '智能家居', icon: 'smarthome', description: '对接 Home Assistant:设备状态、控制与简单自动化', category: 'system', defaultEnabled: false, loader: () => import('./SmartHomeModule.vue'), searchItems, order: 85 }