/** * Set group lights on/off * * @param bool $flag * True for on, false for off * * @return self This object */ public function setOn($flag = true) { $x = new SetGroupState($this); $y = $x->on((bool) $flag); $this->client->sendCommand($y); $this->attributes->action->on = (bool) $flag; return $this; }