Skip to content

Commit

Permalink
Adjust HVAC tests to new schedule restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
fracz committed Mar 28, 2024
1 parent 82d0616 commit 55cd1b0
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,7 @@ public function testCreatingNewScheduleForHvac() {
$client = $this->createAuthenticatedClient();
$client->apiRequest(Request::METHOD_POST, '/api/schedules', [
'channelId' => $this->hvacChannel->getId(),
'actionId' => ChannelFunctionAction::HVAC_SET_TEMPERATURE,
'actionParam' => ['temperature' => 22.5],
'actionId' => ChannelFunctionAction::HVAC_SWITCH_TO_PROGRAM_MODE,
'mode' => ScheduleMode::ONCE,
'timeExpression' => '2 2 * * *',
]);
Expand All @@ -636,8 +635,7 @@ public function testCreatingNewScheduleForHvac() {
$this->assertGreaterThan(0, $scheduleFromResponse['id']);
$config = $scheduleFromResponse['config'][0];
$this->assertEquals('2 2 * * *', $config['crontab']);
$this->assertEquals(ChannelFunctionAction::HVAC_SET_TEMPERATURE, $config['action']['id']);
$this->assertEquals(['temperature' => 22.5], $config['action']['param']);
$this->assertEquals(ChannelFunctionAction::HVAC_SWITCH_TO_PROGRAM_MODE, $config['action']['id']);
}

/** @dataProvider stateExamples */
Expand Down

0 comments on commit 55cd1b0

Please sign in to comment.