/** * Test: Invalid color temp value * * @dataProvider providerInvalidColorTemp * * @covers \Phue\Command\SetLightState::colorTemp * * @expectedException \InvalidArgumentException */ public function testInvalidColorTempValue($temp) { $x = new SetLightState($this->mockLight); $x->colorTemp($temp); }
/** * Set Color temperature * * @param int $value Color temperature value * * @return self This object */ public function setColorTemp($value) { $x = new SetLightState($this); $y = $x->colorTemp((int) $value); $this->client->sendCommand($y); // Change both internal color temp and colormode state $this->attributes->state->ct = (int) $value; $this->attributes->state->colormode = 'ct'; return $this; }