Phue icon indicating copy to clipboard operation
Phue copied to clipboard

Check state of group to see if anything is on

Open GRX opened this issue 4 years ago • 1 comments

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;
    }

GRX avatar May 14 '20 20:05 GRX

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

neoteknic avatar May 25 '21 14:05 neoteknic