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