Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check state of group to see if anything is on #141

Open
GRX opened this issue May 14, 2020 · 1 comment
Open

Check state of group to see if anything is on #141

GRX opened this issue May 14, 2020 · 1 comment

Comments

@GRX
Copy link

GRX commented May 14, 2020

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;
    }
@neoteknic
Copy link

Go on my fork please an make PR here :
https://github.com/neoteknic/Phue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants