update:增加HomeAssistant教程

This commit is contained in:
hrz
2025-04-23 18:17:56 +08:00
parent f0bfdba944
commit 109754fac9
5 changed files with 115 additions and 38 deletions
@@ -172,5 +172,5 @@ public interface Constant {
/**
* 版本号
*/
public static final String VERSION = "0.3.10";
public static final String VERSION = "0.3.11";
}
+1 -1
View File
@@ -3,7 +3,7 @@ import sys
from loguru import logger
from config.config_loader import load_config
SERVER_VERSION = "0.3.10"
SERVER_VERSION = "0.3.11"
def get_module_abbreviation(module_name, module_dict):
@@ -13,7 +13,7 @@ def append_devices_to_prompt(conn):
"functions", []
)
if "hass_get_state" in funcs or "hass_set_state" in funcs:
prompt = "下面是我家智能设备,可以通过homeassistant控制\n"
prompt = "\n下面是我家智能设备列表(位置,设备名,entity_id),可以通过homeassistant控制\n"
devices = conn.config["plugins"]["home_assistant"].get("devices", [])
if len(devices) == 0:
return