Phue\Light::setSaturation PHP Method

setSaturation() public method

Set saturation
public setSaturation ( integer $value ) : self
$value integer 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;
    }