/** * Test: Invalid hue value * * @covers \Phue\Command\SetLightState::hue * * @expectedException \InvalidArgumentException */ public function testInvalidHueValue() { $x = new SetLightState($this->mockLight); $x->hue(70000); }
/** * Set hue * * @param int $value * Hue value * * @return self This object */ public function setHue($value) { $x = new SetLightState($this); $y = $x->hue((int) $value); $this->client->sendCommand($y); // Change both hue and color mode state $this->attributes->state->hue = (int) $value; $this->attributes->state->colormode = 'hs'; return $this; }