feat: DashboardService with per-source cache and stale fallback, FixtureSource

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 14:39:03 +02:00
co-authored by Claude Fable 5.1
parent 89e1e544c5
commit 216b6616fc
6 changed files with 471 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace Weerscherm;
/** Ruwe data van de drie upstream-bronnen. Implementaties: LiveSource (echte API's) en FixtureSource (voorbeelddata). */
interface WeatherSource
{
/** @return array<string, mixed> de "body" van Netatmo getstationsdata */
public function stationsData(): array;
/** @return array<string|int, mixed> de "body" van Netatmo getmeasure (timestamp => [mm]) */
public function measure(string $deviceId, string $moduleId, int $begin, int $end): array;
/** @return array<string, mixed> het "daily"-blok van Open-Meteo */
public function forecast(float $lat, float $lon, string $timezone): array;
}