Skip to content

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

@GRX

Description

@GRX

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions