更新版本号至 0.0.8,完善 Home Assistant 控制指令描述,添加指令接收日志
This commit is contained in:
@@ -62,10 +62,11 @@ export const callText = async (text: string): Promise<CallHaReult> => {
|
||||
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 参数');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/ha-api",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"description": "",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
|
||||
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user