feat: add /api/home_assistant route

This commit is contained in:
2026-04-06 07:42:49 +00:00
parent 55e444675c
commit 0d5bf994b3
@@ -0,0 +1,16 @@
from __future__ import annotations
from fastapi import APIRouter, Depends
from app.models.sources import HomeAssistantSnapshot
from app.services.aggregator import AggregatorService, get_aggregator_service
router = APIRouter(prefix="/api", tags=["home_assistant"])
@router.get("/home_assistant", response_model=HomeAssistantSnapshot)
async def get_home_assistant(
aggregator: AggregatorService = Depends(get_aggregator_service),
) -> HomeAssistantSnapshot:
return await aggregator.get_home_assistant()