更新版本号至 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 参数');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user