From 85eb4ff4f3788647803533ce1afbd37975e68635 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Sat, 31 Jan 2026 16:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E8=87=B3=200.0.8=EF=BC=8C=E5=AE=8C=E5=96=84=20Home=20Assistant?= =?UTF-8?q?=20=E6=8E=A7=E5=88=B6=E6=8C=87=E4=BB=A4=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=8C=87=E4=BB=A4=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/routes/call.ts | 3 ++- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/agent/routes/call.ts b/agent/routes/call.ts index 83622c3..b808d1d 100644 --- a/agent/routes/call.ts +++ b/agent/routes/call.ts @@ -62,10 +62,11 @@ export const callText = async (text: string): Promise => { app.route({ path: 'ha', key: 'ha-call', - description: 'Home Assistant 控制指令', + description: 'Home Assistant 控制指令, 参数为 text 例如 打开 阳台灯', }).define(async (ctx) => { const text = ctx.query?.text || '' + console.log('收到指令:', text); if (!text) { ctx.throw(400, '缺少 text 参数'); } diff --git a/package.json b/package.json index 4ccc339..4f44a2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/ha-api", - "version": "0.0.7", + "version": "0.0.8", "description": "", "main": "src/index.ts", "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e6e4e4..be28555 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,13 @@ importers: '@kevisual/cache': specifier: ^0.0.5 version: 0.0.5 + fuse.js: + specifier: ^7.1.0 + version: 7.1.0 + lru-cache: + specifier: ^11.2.5 + version: 11.2.5 + devDependencies: '@kevisual/context': specifier: ^0.0.4 version: 0.0.4 @@ -20,13 +27,6 @@ importers: '@kevisual/use-config': specifier: ^1.0.28 version: 1.0.28(dotenv@17.2.3) - fuse.js: - specifier: ^7.1.0 - version: 7.1.0 - lru-cache: - specifier: ^11.2.5 - version: 11.2.5 - devDependencies: '@types/bun': specifier: ^1.3.8 version: 1.3.8