modify bangze
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user