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:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user