Ajout section NAS (disques, docker, port VPN) via nas_monitor /api/status

This commit is contained in:
jerem
2026-06-15 14:58:56 +02:00
parent 8dad6454f5
commit ca8f725b3a
5 changed files with 124 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ from PIL import Image
from playwright.async_api import async_playwright
from config import config
from integrations import claude_usage, homeassistant, weather
from integrations import claude_usage, homeassistant, nas, weather
TEMPLATES = Path(__file__).parent / "templates"
@@ -54,10 +54,11 @@ def _gauges(usage: claude_usage.ClaudeUsage) -> list[dict]:
async def build_context() -> dict:
"""Récupère toutes les sources en parallèle et assemble le contexte du template."""
usage, wx, ha = await asyncio.gather(
usage, wx, ha, nas_status = await asyncio.gather(
claude_usage.fetch_usage(),
weather.fetch_weather(),
homeassistant.fetch_states(),
nas.fetch_status(),
)
now = datetime.now(ZoneInfo(config.timezone))
@@ -71,6 +72,7 @@ async def build_context() -> dict:
"claude": usage,
"gauges": _gauges(usage),
"ha_states": ha,
"nas": nas_status,
"updated": now.strftime("%H:%M"),
"stale": False,
}