Skip to content

Commit

Permalink
Added alert function for HUE groups
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 4, 2016
1 parent e7b4a7f commit c237788
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions library/Phue/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,33 @@ public function setOn($flag = true)
return $this;
}

/**
* Get alert
*
* @return string Alert mode
*/
public function getAlert()
{
return $this->attributes->action->alert;
}
/**
* Set light alert
*
* @param string $mode
* Alert mode
*
* @return self This object
*/
public function setAlert($mode = SetLightState::ALERT_LONG_SELECT)
{
$x = new SetGroupState($this);
$y = $x->alert($mode);
$this->client->sendCommand($y);
$this->attributes->action->alert = $mode;
return $this;
}


/**
* Get brightness
*
Expand Down

0 comments on commit c237788

Please sign in to comment.