colorTemp() 공개 메소드

Set color temperature
public colorTemp ( integer $value ) : self
$value integer Color temperature value
리턴 self This object
예제 #1
0
 /**
  * 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);
 }
예제 #2
0
파일: Light.php 프로젝트: sqmk/phue
 /**
  * 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;
 }