This commit is contained in:
2026-06-15 03:15:08 +00:00
parent 0c8ab6018a
commit f2e98942ff
18 changed files with 1484 additions and 261 deletions
+13 -1
View File
@@ -1,8 +1,11 @@
import httpx
from fastapi import APIRouter
from fastapi import APIRouter, Depends
from app.auth.deps import get_current_user
from app.config import get_settings
from app.db.models import User
from app.homelab.comfyui import _use_anima
from app.homelab.openmeteo import build_weather_dashboard
router = APIRouter(prefix="/homelab", tags=["homelab"])
@@ -40,3 +43,12 @@ def homelab_status() -> dict:
"rp_chat_enabled": settings.rp_chat_enabled,
},
}
@router.get("/weather")
def weather_dashboard(
hours_ahead: int = 12,
_: User = Depends(get_current_user),
) -> dict:
hours = max(1, min(int(hours_ahead), 48))
return build_weather_dashboard(hours_ahead=hours)