Phue
Phue copied to clipboard
Check state of group to see if anything is on
Hello,
I tried to make a branch (+ PR) to add a function to see if any light in a group is on rather than the whole group. So instead of a PR here's the code :)
I've added it to Group.php:154;
/**
* Is anything in the group on?
*
* @return bool True if on, false if not
*/
public function anyOn()
{
return (bool) $this->attributes->state->any_on;
}
Go on my fork please an make PR here : https://github.com/neoteknic/Phue