Skip to content

GroupedLightManager

S222em edited this page May 22, 2022 · 46 revisions

Class: GroupedLightManager

Manager for all Hue grouped lights

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new GroupedLightManager(bridge)

Parameters

Name Type
bridge Bridge

Overrides

ResourceManager.constructor

Defined in

src/managers/GroupedLightManager.ts:11

Properties

bridge

Readonly bridge: Bridge

The bridge this manager belongs to

Inherited from

ResourceManager.bridge

Defined in

src/managers/ResourceManager.ts:17


cache

cache: Collection<string, GroupedLight>

Inherited from

ResourceManager.cache

Defined in

src/managers/Manager.ts:12


makeCache

Protected makeCache: (this: Manager<GroupedLight, ApiGroupedLight>, data: ApiGroupedLight) => GroupedLight

Type declaration

▸ (this, data): GroupedLight

Parameters
Name Type
this Manager<GroupedLight, ApiGroupedLight>
data ApiGroupedLight
Returns

GroupedLight

Inherited from

ResourceManager.makeCache

Defined in

src/managers/Manager.ts:13


resolveId

Protected resolveId: (this: Manager<GroupedLight, ApiGroupedLight>, data: ApiGroupedLight) => string

Type declaration

▸ (this, data): string

Parameters
Name Type
this Manager<GroupedLight, ApiGroupedLight>
data ApiGroupedLight
Returns

string

Inherited from

ResourceManager.resolveId

Defined in

src/managers/Manager.ts:14


route

Protected route: Route

Inherited from

ResourceManager.route

Defined in

src/managers/ResourceManager.ts:19

Methods

_add

_add(data): GroupedLight

Adds or updates a resource in the cache

internal

Parameters

Name Type
data ApiGroupedLight

Returns

GroupedLight

Inherited from

ResourceManager._add

Defined in

src/managers/Manager.ts:28


fetch

fetch(id?): Promise<boolean | void>

Fetches a specific resource from the bridge

internal

Parameters

Name Type
id? string

Returns

Promise<boolean | void>

Inherited from

ResourceManager.fetch

Defined in

src/managers/ResourceManager.ts:32


resolve

resolve(resolvable): GroupedLight

Resolves a resolvable to a resource

Parameters

Name Type
resolvable string | GroupedLight

Returns

GroupedLight

Inherited from

ResourceManager.resolve

Defined in

src/managers/Manager.ts:42

hue.ts

Clone this wiki locally