feat(api): humidity, CO2, current pressure and 24h pressure history

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-13 09:34:20 +02:00
co-authored by Claude Fable 5.1
parent 66bce8e8d0
commit dba1875683
16 changed files with 380 additions and 20 deletions
+14
View File
@@ -198,4 +198,18 @@ final class NetatmoClientTest extends TestCase
'date_begin' => 1000, 'date_end' => 2000, 'optimize' => 'false', 'real_time' => 'false',
], $this->http->requests[0]['params']);
}
public function testGetPressureHistoryQuery(): void
{
$this->store->write(['access_token' => 'A1', 'refresh_token' => 'R1', 'expires_at' => self::NOW + 3600]);
$this->http->queue(200, json_decode((string) file_get_contents(__DIR__ . '/fixtures/getmeasure-pressure.json'), true));
$body = $this->client()->getPressureHistory('dev', 1000, 2000);
self::assertCount(49, $body);
self::assertSame([
'device_id' => 'dev', 'scale' => '30min', 'type' => 'Pressure',
'date_begin' => 1000, 'date_end' => 2000, 'optimize' => 'false', 'real_time' => 'false',
], $this->http->requests[0]['params']);
}
}