diff --git a/custom_components/ai_automation_suggester/manifest.json b/custom_components/ai_automation_suggester/manifest.json index 364fcba..a9433df 100644 --- a/custom_components/ai_automation_suggester/manifest.json +++ b/custom_components/ai_automation_suggester/manifest.json @@ -14,5 +14,5 @@ "pyyaml>=6.0", "voluptuous>=0.13.1" ], - "version": "1.1.3" + "version": "1.1.4" } \ No newline at end of file diff --git a/custom_components/ai_automation_suggester/sensor.py b/custom_components/ai_automation_suggester/sensor.py index f9b9181..a6cfca4 100644 --- a/custom_components/ai_automation_suggester/sensor.py +++ b/custom_components/ai_automation_suggester/sensor.py @@ -76,7 +76,7 @@ def __init__( "name": f"AI Automation Suggester ({entry.data.get(CONF_PROVIDER, 'unknown')})", "manufacturer": "Community", "model": entry.data.get(CONF_PROVIDER, "unknown"), - "sw_version": "1.1.3", + "sw_version": "1.1.4", } self._entry = entry self._previous_suggestions = None @@ -168,7 +168,7 @@ def __init__( "name": f"AI Automation Suggester ({entry.data.get(CONF_PROVIDER, 'unknown')})", "manufacturer": "Community", "model": entry.data.get(CONF_PROVIDER, "unknown"), - "sw_version": "1.1.3", + "sw_version": "1.1.4", } self._entry = entry self._attr_native_value = STATE_UNKNOWN diff --git a/custom_components/ai_automation_suggester/translations/zh.json b/custom_components/ai_automation_suggester/translations/zh.json new file mode 100644 index 0000000..c75ead9 --- /dev/null +++ b/custom_components/ai_automation_suggester/translations/zh.json @@ -0,0 +1,55 @@ +{ + "config": { + "step": { + "user": { + "title": "配置 AI 自动化建议器", + "data": { + "provider": "AI 提供商", + "max_tokens": "最大输出令牌" + } + }, + "provider_config": { + "title": "提供商设置", + "data": { + "model": "模型名称", + "api_key": "API 密钥", + "max_tokens": "最大输出令牌", + "ip_address": "IP 地址", + "port": "端口", + "use_https": "使用 HTTPS" + }, + "description": "最大令牌数量控制 AI 响应的长度。默认值为 500。如需更长响应,请增加此值。" + } + }, + "error": { + "cannot_connect": "无法连接到服务", + "invalid_auth": "身份验证无效", + "invalid_config": "配置无效", + "unknown": "意外错误", + "no_entities": "未发现新实体", + "api_error": "发生 API 错误", + "required_field": "此字段为必填项" + }, + "abort": { + "already_configured": "提供商已配置", + "provider_not_supported": "目前不支持此提供商" + } + }, + "services": { + "generate_suggestions": { + "name": "生成建议", + "description": "手动触发 AI 自动化建议", + "fields": { + "provider_config": { + "name": "提供商配置", + "description": "选择使用哪个提供商配置(如果有多个)" + }, + "custom_prompt": { + "name": "自定义提示", + "description": "可选自定义提示,覆盖默认系统提示" + } + } + } + } + } + \ No newline at end of file