Files
Ai/dashboard_data/cards/farm_alerts_timeline.py
T

7 lines
286 B
Python
Raw Normal View History

2026-03-22 01:09:09 +03:30
def build_farm_alerts_timeline(sensor_id: str, context: dict | None = None, ai_bundle: dict | None = None) -> dict:
ai_bundle = ai_bundle or {}
2026-03-22 03:08:27 +03:30
return {
"alerts": ai_bundle.get("timeline", []),
"structuredContext": ai_bundle.get("structured_context", {}),
}