Phue\Group::setLights PHP Method

setLights() public method

Set lights
public setLights ( array $lights ) : self
$lights array Light ids or Light objects
return self This object
    public function setLights(array $lights)
    {
        $lightIds = array();
        foreach ($lights as $light) {
            $lightIds[] = (string) $light;
        }
        $x = new SetGroupAttributes($this);
        $y = $x->lights($lightIds);
        $this->client->sendCommand($y);
        $this->attributes->lights = $lightIds;
        return $this;
    }