modify bangze

This commit is contained in:
2026-09-18 09:36:50 +08:00
parent e0211105bd
commit fb158d75ca
46 changed files with 10 additions and 2245 deletions
+10 -1
View File
@@ -500,10 +500,19 @@ async def alarm_report(
# 2. ip 音柱 TTS 播放(可通过配置开关关闭),失败时仅记录日志,不影响主流程
from .global_var import ip_sound_column_volume, ip_sound_column_tts
properties = full_data.get("Result", {}).get("Properties", [])
if len(properties) > 0:
properties_dict = {
prop.get("property", ""): prop.get("value", "") for prop in properties
}
area = f"{properties_dict.get("IntrudeRegionId", "")},"
else:
area = ""
tts_text = ip_sound_column_tts.get(
full_data.get("Summary", ""),
f"告警: {full_data.get('Summary', '')}"
f"告警: {area}{full_data.get('TaskDesc', '')}".strip()
)
tts_payload = {