hue() 공개 메소드

Set hue
public hue ( integer $value ) : self
$value integer Hue value
리턴 self This object
예제 #1
0
 /**
  * Test: Invalid hue value
  *
  * @covers \Phue\Command\SetLightState::hue
  *
  * @expectedException \InvalidArgumentException
  */
 public function testInvalidHueValue()
 {
     $x = new SetLightState($this->mockLight);
     $x->hue(70000);
 }
예제 #2
0
파일: Light.php 프로젝트: sqmk/phue
 /**
  * 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;
 }