-
Notifications
You must be signed in to change notification settings - Fork 1
GroupedLight
Represents a Hue grouped light
-
↳
GroupedLight
• new GroupedLight(bridge
)
Name | Type |
---|---|
bridge |
Bridge |
• Readonly
bridge: Bridge
The bridge this Base belongs to
• data: ApiGroupedLight
Raw data received from the API
• type: ApiResourceType
= ApiResourceType.GroupedLight
The type of this resource
src/structures/GroupedLight.ts:12
• get
group(): Group
<ApiRoom
| ApiZone
>
Connected group
src/structures/GroupedLight.ts:24
• get
groupId(): string
Connected group ID
string
src/structures/GroupedLight.ts:37
• get
id(): string
ID of this grouped light
string
Resource.id
src/structures/GroupedLight.ts:17
▸ _clone(): GroupedLight
Clones this Base
internal
▸ Protected
_edit(data
): Promise
<void
>
Edits this group light with raw API data structure
internal
Name | Type |
---|---|
data |
ApiGroupedLight |
Promise
<void
>
src/structures/GroupedLight.ts:93
▸ _patch(data
): void
Patches this Base with new data received from the API
internal
Name | Type | Description |
---|---|---|
data |
ApiGroupedLight |
Data to patch |
void
▸ _update(data
): GroupedLight
Clones and patches this Base
internal
Name | Type | Description |
---|---|---|
data |
any |
Data to patch |
▸ fetch(): Promise
<GroupedLight
>
Fetch this grouped light from the bridge
Promise
<GroupedLight
>
src/structures/GroupedLight.ts:75
▸ isOn(): boolean
Whether a light in the group is on
boolean
src/structures/GroupedLight.ts:83
▸ off(): Promise
<void
>
Edits the on state of all lights to false
Promise
<void
>
src/structures/GroupedLight.ts:61
▸ on(): Promise
<void
>
Edits the on state of all lights to true
Promise
<void
>
src/structures/GroupedLight.ts:54
▸ state(state
): Promise
<void
>
Edits the state of this grouped light
example
groupedLight.state({ on: true });
Name | Type |
---|---|
state |
LightStateOptions |
Promise
<void
>
src/structures/GroupedLight.ts:47
▸ toggle(): Promise
<void
>
Toggles the on state of all lights
Promise
<void
>
src/structures/GroupedLight.ts:68
▸ Static
transformState(options
): ApiGroupedLight
Name | Type |
---|---|
options |
LightStateOptions |